openmldb/bin/openmldb --zk_cluster=127.0.0.1:2181 --zk_root_path=/openmldb --role=sql_client < test.sql 即可 注意test.sql内,c1.csv的路径,需要跟taskmanager(spark.home=local)在同一台机器上,并且写绝对路径。 输出结果里都是SUCCEED,没有ERROR就可以。
Created
July 20, 2022 08:24
-
-
Save vagetablechicken/015e3c42e6b3e5a3ab740d3a5efe1cc9 to your computer and use it in GitHub Desktop.
openmldb test sample
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c1 | |
1 | |
2 | |
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create database if not exists test_db; | |
use test_db; | |
create table if not exists t1(c1 int); | |
-- offline mode | |
set @@sync_job=true; | |
set @@job_timeout=200000; | |
load data infile '<abs_path>/c1.csv' into table t1 options(mode='overwrite'); | |
select * from t1 into outfile '/tmp/offline_output' options(mode='overwrite'); | |
-- online mode | |
set @@execute_mode='online'; | |
insert into t1 values(1),(2); | |
select * from t1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment