You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get started with a simple demo on Linux using docker-compose :
git clone https://github.com/Altinity/clickhouse-sink-connector.git
cd clickhouse-sink-connector/sink-connector-lightweight/docker
export CLICKHOUSE_SINK_CONNECTOR_LT_IMAGE=altinity/clickhouse-sink-connector:2.4.0-lt
docker-compose up
# MySQL console
docker exec -it mysql-master mysql -uroot -proot
# ClickHouse console
clickhouse-client -mn -h localhost --user root --password root
# clean up
docker-compose down
SQL to run on MySQL that will get replicated :
-- promotion
update employees set jobTitle = concat('Senior ', jobTitle);
select * from employees;
-- deletion example, 3 tables
select count(*) from payments;
select count(*) from customers;
select count(*) from employees;
delete from payments where customerNumber in (select customerNumber from customers where salesRepEmployeeNumber=1621);
delete from customers where salesRepEmployeeNumber=1621;
delete from employees where lastName='Kato';
select count(*) from payments;
select count(*) from customers;
select count(*) from employees;
--- DDL
alter table employees add column hireDate Date default (curdate());
alter table employees drop column hireDate;
--- inserts
insert into employees(employeeNumber,lastName,firstName,extension,email,officeCode,reportsTo,jobTitle) select 2000,lastName,firstName,extension,email,officeCode,reportsTo,jobTitle from
employees where lastName='Gerard';
alter table employees drop CONSTRAINT `employees_ibfk_2`;
alter table employees modify column officeCode int not null;
show create table employees;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To get started with a simple demo on Linux using docker-compose :
SQL to run on MySQL that will get replicated :
Checksums (Python 3.10 and above)
Beta Was this translation helpful? Give feedback.
All reactions