This commit is contained in:
Denis Hananein 2024-08-27 17:29:06 -07:00 committed by GitHub
commit 35f10de88a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 0 deletions

View File

@ -846,6 +846,7 @@ void LocalServer::addOptions(OptionsDescription & options_description)
{
options_description.main_description->add_options()
("table,N", po::value<std::string>(), "name of the initial table")
("copy", "shortcut for format conversion, equivalent to: --query 'SELECT * FROM table'")
/// If structure argument is omitted then initial query is not generated
("structure,S", po::value<std::string>(), "structure of the initial table (list of column and type names)")
@ -918,6 +919,12 @@ void LocalServer::processOptions(const OptionsDescription &, const CommandLineOp
getClientConfiguration().setString("send_logs_level", options["send_logs_level"].as<std::string>());
if (options.count("wait_for_suggestions_to_load"))
getClientConfiguration().setBool("wait_for_suggestions_to_load", true);
if (options.count("copy"))
{
if (!queries.empty())
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Options '--copy' and '--query' cannot be specified at the same time");
queries.emplace_back("SELECT * FROM table");
}
}
void LocalServer::readArguments(int argc, char ** argv, Arguments & common_arguments, std::vector<Arguments> &, std::vector<Arguments> &)

View File

@ -0,0 +1 @@
Wed Jul 01 06:29:00 +0000 2020 1278214001395216384 1278214001395216384 È SICUROOOOO? <a href="https://elenoireferruzzibot.com" rel="nofollow">BotElenoire</a> false \N \N \N \N \N (false,'Mon Nov 04 18:14:32 +0000 2019',true,false,'Limportante è averli puliti',12,NULL,1239,NULL,3,false,1191418444324966403,'1191418444324966403',false,NULL,1,NULL,'Elenoire Ferruzzi Bot',NULL,'F5F8FA','','',false,'https://pbs.twimg.com/profile_banners/1191418444324966403/1578228379','http://pbs.twimg.com/profile_images/1191422843084521472/HEy5I5g8_normal.jpg','https://pbs.twimg.com/profile_images/1191422843084521472/HEy5I5g8_normal.jpg','1DA1F2','C0DEED','DDEEF6','333333',true,false,'BotElenoire',20769,NULL,'none',NULL,NULL,false) \N \N \N \N false 0 0 0 0 ([],[],[],[]) false false low it 1593584940657

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_LOCAL} --copy < $CURDIR/data_json/twitter.jsonl