You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
richie
d098051a32
|
2 years ago | |
---|---|---|
data | 2 years ago | |
gradle/wrapper | 2 years ago | |
src/main/java/com/fanruan/hihidata/datasource/server | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
build.gradle.kts | 2 years ago | |
gradlew | 2 years ago | |
gradlew.bat | 2 years ago | |
settings.gradle.kts | 2 years ago |
README.md
API数据源使用示例
调用示例代码
Authentication authentication = new Authentication("#key", "#secret");
DatasourceOperation operation = new DatasourceOperation(authentication);
operation.open();
// 创建一个分组,如果已经存在,则直接跳过
operation.createGroup("TestGroup");
// 在分组下创建一个表,返回创建的表的ID,如果表已经存在,则直接返回表ID
String tableId = operation.createTable("HelloTable", "TestGroup");
// 获取上传文件的url
String fileUploadUrl = operation.requestUploadUrl(tableId);
// 将数据文件上传
HttpKits.upload(fileUploadUrl, new File(System.getProperty("user.dir") + "/data/地区数据分析.csv"));
// 标记该表的数据已经上传完成
operation.markAsFinish(tableId);