IS
Size: a a a
IS
AR
NR
В
D
AP
AP
settings.CLICKHOUSE_HOST
на что указывает?AP
from django.conf import settings
from django.core.management.base import BaseCommand
from infi.clickhouse_orm.database import Database
class Command(BaseCommand):
def handle(self, *args, **options):
db = Database(
settings.CLICKHOUSE_DB,
db_url="http://{}:8123/".format(settings.CLICKHOUSE_HOST),
username=settings.CLICKHOUSE_USER,
password=settings.CLICKHOUSE_PASSWORD
)
db.migrate('users.users_migrations')
db.migrate('events.events_migrations')
A
CREATE DICTIONARY dict_country (
country String DEFAULT 'unknown',
country_code String DEFAULT 'unknown'
)
PRIMARY KEY country
SOURCE(CLICKHOUSE(HOST ..... ))
LIFETIME(MIN 1 MAX 10)
LAYOUT(complex_key_hashed());
SELECT dictGet('mydb.dict_country', 'country_code', tuple('Russia'))
select dictGet('mydb.dict_country', 'country_code', tuple(country)) as country_code
from ...
SQL Error [42]: ClickHouse exception, code: 42, host: chdb.datos.live, port: 54345; Code: 42, e.displayText() = DB::Exception: Function dictGet... takes 3 or 4 arguments (version 20.4.3.16 (official build))
VT
select k-means(number-of-cluster=10, distance-methods=[ngrams, evklidovo, evklidovo]))(columnA, columnB, columnC...) from Table where....
DT
CREATE DICTIONARY dict_country (
country String DEFAULT 'unknown',
country_code String DEFAULT 'unknown'
)
PRIMARY KEY country
SOURCE(CLICKHOUSE(HOST ..... ))
LIFETIME(MIN 1 MAX 10)
LAYOUT(complex_key_hashed());
SELECT dictGet('mydb.dict_country', 'country_code', tuple('Russia'))
select dictGet('mydb.dict_country', 'country_code', tuple(country)) as country_code
from ...
SQL Error [42]: ClickHouse exception, code: 42, host: chdb.datos.live, port: 54345; Code: 42, e.displayText() = DB::Exception: Function dictGet... takes 3 or 4 arguments (version 20.4.3.16 (official build))
A
N
AS
Y
Y
AS
Y
Y