bashkarev / clickhouse Goto Github PK
View Code? Open in Web Editor NEWExtension ClickHouse for Yii 2
License: MIT License
Extension ClickHouse for Yii 2
License: MIT License
Table structure:
'version' => 'String',
'date' => 'Date',
'apply_time' => 'UInt32',
'is_deleted' => 'UInt8' //0 active 1 //deleted
Migration history insert:
$command->insert($this->migrationTable, [
'version' => $version,
'apply_time' => time(),
'is_deleted' => 0
])->execute();
If I get it correctly, starting from ClickHouse 1.1.54237 in system.columns
default_type
was renamed to default_kind
, so it lead to some mistakes, for example here.
...
Command::batchInsert is a standard feature, but ClickHouse can insert data from uploaded files via Http Transport for better performance.
It would be nice to have this functionality. A signature may be similar to this Command::batchInsertFiles($table, array $files)
SELECT `statistic`.* FROM `statistic` ALL INNER JOIN `copyright_owner` ON statistic.copyright_owner_id=copyright_owner.id ORDER BY `statistic`.`viewed_at` LIMIT 20 OFFSET 1;
Syntax error: failed at position 165:
SELECT `statistic`.* FROM `statistic` ALL INNER JOIN `copyright_owner` ON statistic.copyright_owner_id=copyright_owner.id ORDER BY `statistic`.`viewed_at` LIMIT 20 OFFSET 1;
Expected one of: UNION ALL, Comma, BY, SETTINGS, INTO OUTFILE, FORMAT, LIMIT, token
Which are the points to use "low-level" sockets instead of yii-httpclient for example?
Performance? Could you provide a link to some tests or articles?
Otherwise, it looks like the wheel reinventing :)
Consider to add 'database' property to Connection or improve DSN syntax similar to regular connections (mysql for example): 'dsn' => 'tcp://localhost:8823;dbname=test'
Hello. I make a migration:
use bashkarev\clickhouse\Migration;
class m230706_140057_create_target extends Migration
{
const TABLE_NAME = 'first_table';
public function up()
{
$this->createTable(
self::TABLE_NAME,
[
'id' => $this->primaryKey(),
'account' => $this->string(35),
'account_state' => $this->tinyInteger(),
]
);
}
...
run
yii clickhouse-migrate
and get error:
create table first_table ...Exception 'yii\db\Exception' with message 'Specify engine type'
Need sample options string
Connection.php
change
public function getClient(): Client
{
return $this->_client;
}
to
public function getClient(): Client
{
$this->open();
return $this->_client;
}
I have query where in (ids) is a big items. How I can set options to increase during querying?
the manual of v2 refers to batchInsertFiles()
which does not seem to exist and throws an exception
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.