Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

data-upload-java-cli数据 upload Java CLI

Agent Skill

用于辅助 Java 项目开发、面向对象设计、Spring 生态、Maven 或 Gradle 依赖和后端工程实践。它适合让 Agent 分析类结构、设计接口、整理服务分层、生成测试或检查常见代码坏味道。使用时需要结合项目已有架构、包结构和依赖版本,不应只按通用教程改代码;涉及数据库、事务、并发或框架配置时,应先确认运行环境和回归测试范围。

总安装

816

周安装

33

GitHub Stars

14

下载量

256
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:data-upload-java-cli(数据 upload Java CLI)
来源仓库:https://github.com/stahura/domo-ai-vibe-rules
仓库路径:skills/data-upload-java-cli
安装命令:
npx skills add https://github.com/stahura/domo-ai-vibe-rules --skill data-upload-java-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/stahura/domo-ai-vibe-rules --skill data-upload-java-cli

简介

指导通过 Java CLI 上传数据至 Domo,优先使用 JSON Connector,失败时回退到 CLI。

  • 涵盖 REST API 数据接入、CSV 文件上传及连接器配置流程。
  • 适用于需要持久化数据流或无法使用无代码方案的场景。
  • 需验证认证方式、分页支持和解析兼容性后再执行上传。
  • data-upload-java-cli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Domo Data Upload Guide

Preferred Strategy — JSON Connector first, CLI fallback: When the data source is a REST/JSON API, always try the Domo JSON No-Code Connector (domo-json-no-code-connector skill) first. It creates a live, re-runnable connector stream inside Domo so data can be refreshed from the UI without re-running scripts. Only fall back to the Java CLI when: - The JSON connector fails (auth issues, unsupported pagination, parsing errors), or - The data is already in CSV form (local files, database exports, etc.) and there is no source API to connect to.

Overview

This guide covers the Java CLI fallback for uploading CSV data to Domo using domoutil.jar. The CLI handles schema derivation, dataset creation, chunked uploads, and indexing automatically.

JSON Connector First / CLI Fallback Pattern

When pulling from a REST/JSON API into Domo, use this two-path strategy in code:

def ingest_object(obj_type, cfg):
    # Path 1 — JSON No-Code Connector (creates a live stream in Domo)
    ok, dataset_id = try_json_connector(obj_type, cfg)

    # Path 2 — CLI fallback (fetch → CSV → upload)
    if not ok:
        ok, dataset_id = try_cli_fallback(obj_type, cfg, work_dir)

Path 1 (JSON connector) steps:

  1. POST /api/data/v1/accounts — create a json5 account for auth
  2. POST /api/data/v1/streams — configure URL, headers, parsing, paging
  3. POST /api/data/v1/streams/{id}/executions — trigger a run
  4. Poll GET /api/data/v1/streams/{id}/executions/{execId} until currentState is "SUCCESS" or "ERROR"
  5. If "ERROR" or HTTP error at any step → fall through to Path 2

Path 2 (CLI fallback) steps:

  1. Fetch all pages from the source API using requests
  2. Write records to a CSV file
  3. derive-schema → build schema JSON
  4. create-dataset → get dataset UUID
  5. upload-dataset -h → upload CSV

When to skip directly to CLI:

  • Data is already CSV (no source API)
  • Source API is not JSON/REST (SOAP, binary, etc.)
  • You've already confirmed the JSON connector can't handle the source's pagination

Auth note for the JSON connector: Use credentialsType: "fields" with authentication: "none" and inject the Authorization header directly in jsonSelection.httpsHeaders. Do not use authType — it is not valid for json5 and returns a 400.

Java CLI (Fallback Path)

  • CLI Location: /Users/elliottleonard/Documents/Cursor/CLI/domoutil.jar
  • Run command: java -jar /Users/elliottleonard/Documents/Cursor/CLI/domoutil.jar

Prerequisites

  • Java installed
  • A Domo access token (format: DDCI...)
  • A Domo instance URL (e.g., instance.domo.com)
  • CSV file(s) to upload (RFC 4180-compliant)

Quick Reference

Connection

connect -server <instance>.domo.com -token <API_TOKEN>

Verify with whoami.

Complete Workflow

Step 1: Derive Schema from CSV

derive-schema -d /path/to/data.csv -r 500
  • -d: Path to the CSV file
  • -r: Number of rows to sample for type detection (500 is a good default)
  • Returns column names and detected types: STRING, LONG, DOUBLE, DATETIME, etc.

Output format:

Schema:
  column_name1         STRING
  column_name2         LONG
  column_name3         DATETIME

Step 2: Create a Schema JSON File

Convert the derive-schema output into a JSON schema file:

{
  "columns": [
    {
      "name": "column_name1",
      "type": "STRING",
      "metadata": null,
      "upsertKey": false
    },
    {
      "name": "column_name2",
      "type": "LONG",
      "metadata": null,
      "upsertKey": false
    },
    {
      "name": "column_name3",
      "type": "DATETIME",
      "metadata": null,
      "upsertKey": false
    }
  ],
  "objects": []
}

Valid column types: STRING, LONG, DOUBLE, DECIMAL, DATETIME, DATE

Step 3: Create the Dataset in Domo

create-dataset -n "<Dataset Name>" -t "<type>" -s /path/to/schema.json
  • -n: Dataset name (displayed in Domo)
  • -t: Dataset type (use "domo-cli" as a general-purpose type)
  • -s: Path to the schema JSON file

Output:

Created DataSet: <dataset-uuid>

Save this UUID — you need it for the upload step.

Step 4: Upload CSV Data

upload-dataset -i <dataset-uuid> -f /path/to/data.csv -h
  • -i / --id: Dataset UUID from the create step
  • -f / --data: Path to the CSV file
  • -h / --headers: Required when the CSV has a header row (skips the first row)

Output on success:

Started upload for DataSet <uuid>.
Finished upload for DataSet <uuid>. Bytes sent X.
Started indexing for dataset <uuid>
Finished indexing for dataset <uuid> with status SUCCESS
Data uploaded successfully

Upload Options

FlagDescription
-i <ID>Dataset UUID (required)
-f <FILE>CSV file path
-hCSV has a header row
-a / --appendAppend to existing data instead of replacing
-d <DIR>Upload all CSVs in a directory (files should NOT include headers)
-cFiles are gzipped (only with -d)
-p <TAG>Partition tag (only with --append)
-m <N>Max upload threads
-xSkip indexing after upload

Scripted / Non-Interactive Mode

Pipe commands via stdin for automation:

echo -e "connect -server instance.domo.com -token YOUR_TOKEN\nupload-dataset -i <uuid> -f data.csv -h\nquit" \
  | java -jar /Users/elliottleonard/Documents/Cursor/CLI/domoutil.jar

Always end with quit to ensure clean exit.

Batch Upload: Multiple CSVs

Python Script Pattern

This is the recommended approach for uploading multiple CSV files at once. The script:

  1. Derives schemas for each CSV
  2. Creates schema JSON files
  3. Creates datasets in Domo
  4. Uploads the CSV data
import subprocess, json, os, re

csv_dir = "/path/to/csv/directory"
cli = "/Users/elliottleonard/Documents/Cursor/CLI/domoutil.jar"
server = "instance.domo.com"
token = "DDCI..."
schema_dir = "/tmp/domo_schemas"
os.makedirs(schema_dir, exist_ok=True)

csvs = sorted([f for f in os.listdir(csv_dir) if f.endswith('.csv')])

# --- Phase 1: Derive schemas and save as JSON ---
for csv_file in csvs:
    csv_path = os.path.join(csv_dir, csv_file)
    cmds = f"connect -server {server} -token {token}\nderive-schema -d {csv_path} -r 500\nquit"
    result = subprocess.run(['java', '-jar', cli], input=cmds, capture_output=True, text=True, timeout=60)

    columns = []
    in_schema = False
    for line in result.stdout.split('\n'):
        if 'Schema:' in line:
            in_schema = True
            continue
        if in_schema and line.startswith('  ') and line.strip():
            parts = line.split()
            if len(parts) >= 2:
                col_type = parts[-1]
                col_name = ' '.join(parts[:-1]).strip()
                columns.append({"name": col_name, "type": col_type, "metadata": None, "upsertKey": False})
        elif in_schema and line.startswith('>'):
            in_schema = False

    schema = {"columns": columns, "objects": []}
    schema_path = os.path.join(schema_dir, csv_file.replace('.csv', '.json'))
    with open(schema_path, 'w') as f:
        json.dump(schema, f, indent=2)

# --- Phase 2: Create datasets ---
cmds = [f"connect -server {server} -token {token}"]
for csv_file in csvs:
    schema_path = os.path.join(schema_dir, csv_file.replace('.csv', '.json'))
    # Generate a friendly name from the filename
    friendly_name = csv_file.replace('.csv', '').split('.')[-1].replace('_', ' ').title()
    cmds.append(f'create-dataset -n "{friendly_name}" -t "domo-cli" -s {schema_path}')
cmds.append("quit")

result = subprocess.run(['java', '-jar', cli], input='\n'.join(cmds), capture_output=True, text=True, timeout=120)

# Parse dataset IDs from output
dataset_ids = []
for line in result.stdout.split('\n'):
    match = re.search(r'Created DataSet: ([0-9a-f-]{36})', line)
    if match:
        dataset_ids.append(match.group(1))

# --- Phase 3: Upload data ---
cmds = [f"connect -server {server} -token {token}"]
for csv_file, dataset_id in zip(csvs, dataset_ids):
    csv_path = os.path.join(csv_dir, csv_file)
    cmds.append(f'upload-dataset -i {dataset_id} -f {csv_path} -h')
cmds.append("quit")

result = subprocess.run(['java', '-jar', cli], input='\n'.join(cmds), capture_output=True, text=True, timeout=600)
print(result.stdout)

Shell-Only Pattern

For simpler cases, use a shell script:

CLI="/Users/elliottleonard/Documents/Cursor/CLI/domoutil.jar"
SERVER="instance.domo.com"
TOKEN="DDCI..."

# Create commands file
cat > /tmp/upload_cmds.txt << EOF
connect -server $SERVER -token $TOKEN
upload-dataset -i <dataset-id-1> -f /path/to/file1.csv -h
upload-dataset -i <dataset-id-2> -f /path/to/file2.csv -h
quit
EOF

cat /tmp/upload_cmds.txt | java -jar "$CLI"

Replacing Data in an Existing Dataset

To replace all data in an existing dataset (not append), use the same upload-dataset command without --append:

upload-dataset -i <existing-dataset-uuid> -f /path/to/new_data.csv -h

This performs a full replace — all existing rows are removed and replaced with the new CSV data.

Appending Data

To add rows to an existing dataset without removing existing data:

upload-dataset -i <dataset-uuid> -f /path/to/new_rows.csv -h --append

Common Pitfalls

1. Missing -h Flag

If your CSV has a header row and you forget -h, the header row will be imported as data. Always use -h for CSVs with headers.

2. upload-dataset Requires an Existing Dataset

The upload-dataset command does NOT create a dataset. You must first create-dataset with a schema file, then upload-dataset with the returned UUID. Uploading without a valid --id results in:

Executing POST: https://.../datasources/null/uploads
An error occurred while uploading the data from file

3. Schema Column Names Must Match CSV Headers

The column names in the schema JSON must match the CSV header names exactly (case-sensitive). Use derive-schema to auto-detect them.

4. -t Flag is Required for create-dataset

The dataset type (-t) is required. Use "domo-cli" as a safe default:

create-dataset -n "My Dataset" -t "domo-cli" -s schema.json

5. Large Files Are Auto-Split

Files over ~10MB are automatically split into multiple upload parts. The CLI handles this transparently. For very large uploads, consider using -m to control thread count.

6. derive-schema First Column Parsing

The derive-schema output can sometimes concatenate the first column name with preceding text. Always verify the first column name against your CSV header.

7. Directory Uploads Expect No Headers

When using -d (directory upload), the CSV files should NOT contain header rows. This mode is designed for pre-split partitioned data.

Verifying Uploads

After uploading, verify data is accessible:

query-data -id <dataset-uuid> -q "SELECT * FROM table LIMIT 10"

Or check dataset metadata:

get-dataset -id <dataset-uuid>
get-schema -id <dataset-uuid>

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.68%
按下载量换算91

Claude

29.8%
按下载量换算76

Cursor

20.42%
按下载量换算52

Gemini CLI

9.59%
按下载量换算25

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills