Azure Data Studio
A data processing and analysis toolkit for querying, importing, exporting, transforming, and validating data. Provides a lightweight CLI interface for common data operations with persistent local storage.
Commands
| Command | Description |
|---|
| INLINECODE0 | Query data with provided search terms |
| INLINECODE1 |
Import a data file into the local data store |
|
export | Export results to a specified destination or stdout |
|
transform | Transform data from one format to another |
|
validate | Validate data against the expected schema |
|
stats | Show basic statistics (record count) |
|
schema | Display the data schema (id, name, value, timestamp)|
|
sample | Show sample data (first 5 records from data log) |
|
clean | Clean and deduplicate data entries |
|
dashboard | Show a quick dashboard with total record count |
|
help | Show the help message with all available commands |
|
version | Print the current version number |
Data Storage
- - Data directory:
~/.local/share/azuredatastudio/ (override with AZUREDATASTUDIO_DIR env variable) - Data log:
$DATA_DIR/data.log — primary data storage file for records - History log:
$DATA_DIR/history.log — tracks all command executions with timestamps
Schema
The default data schema uses the following fields:
| Field | Description |
|---|
| INLINECODE16 | Unique record identifier |
| INLINECODE17 |
Entry name or label |
|
value | Data value |
|
timestamp | When the record was created |
Requirements
- - Bash 4.0+
- Standard Unix utilities (
wc, head, cat, date) - No API keys or external services needed
- No database server required — uses flat file storage
- Works on Linux and macOS
When to Use
- 1. Data querying — When you need to run quick queries against your local data store without spinning up a full database
- File import/export — When you need to import data files into the local store or export records for use in other tools
- Data validation — When you want to verify your data conforms to the expected schema before processing
- Data transformation — When you need to convert data between formats (e.g., restructuring fields)
- Quick statistics — When you want to see basic metrics like total record count or preview sample data at a glance
Examples
CODEBLOCK0
Output
All command results are printed to stdout. You can redirect output with standard shell operators:
CODEBLOCK1
Configuration
Set the AZUREDATASTUDIO_DIR environment variable to change the data directory:
CODEBLOCK2
Default location: ~/.local/share/azuredatastudio/
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
Azure Data Studio
一款用于查询、导入、导出、转换和验证数据的数据处理与分析工具包。提供轻量级CLI接口,支持常见数据操作,并具备持久化本地存储功能。
命令
| 命令 | 描述 |
|---|
| query | 使用提供的搜索词查询数据 |
| import |
将数据文件导入本地数据存储 |
| export | 将结果导出到指定目标或标准输出 |
| transform | 将数据从一种格式转换为另一种格式 |
| validate | 根据预期模式验证数据 |
| stats | 显示基本统计信息(记录数) |
| schema | 显示数据模式(id, name, value, timestamp) |
| sample | 显示样本数据(数据日志中的前5条记录) |
| clean | 清理并去重数据条目 |
| dashboard | 显示包含总记录数的快速仪表盘 |
| help | 显示包含所有可用命令的帮助信息 |
| version | 打印当前版本号 |
数据存储
- - 数据目录: ~/.local/share/azuredatastudio/(可通过 AZUREDATASTUDIODIR 环境变量覆盖)
- 数据日志: $DATADIR/data.log — 记录的主要数据存储文件
- 历史日志: $DATA_DIR/history.log — 记录所有命令执行及时间戳
模式
默认数据模式使用以下字段:
条目名称或标签 |
| value | 数据值 |
| timestamp | 记录创建时间 |
要求
- - Bash 4.0+
- 标准Unix工具(wc、head、cat、date)
- 无需API密钥或外部服务
- 无需数据库服务器 — 使用平面文件存储
- 适用于Linux和macOS
使用场景
- 1. 数据查询 — 当您需要对本地数据存储执行快速查询,而无需启动完整数据库时
- 文件导入/导出 — 当您需要将数据文件导入本地存储,或导出记录供其他工具使用时
- 数据验证 — 当您希望在处理前验证数据是否符合预期模式时
- 数据转换 — 当您需要在不同格式之间转换数据时(例如,重构字段)
- 快速统计 — 当您希望一眼查看基本指标(如总记录数)或预览样本数据时
示例
bash
使用搜索词查询数据
azuredatastudio query SELECT * FROM users WHERE active=1
导入CSV文件
azuredatastudio import data.csv
将结果导出到文件
azuredatastudio export results.json
将数据从一种格式转换为另一种格式
azuredatastudio transform input.csv output.json
根据模式验证数据
azuredatastudio validate
显示基本统计信息
azuredatastudio stats
显示数据模式
azuredatastudio schema
预览样本数据(前5条记录)
azuredatastudio sample
清理并去重数据
azuredatastudio clean
显示包含总计数的快速仪表盘
azuredatastudio dashboard
输出
所有命令结果均打印到标准输出。您可以使用标准Shell操作符重定向输出:
bash
azuredatastudio query users > query-results.txt
azuredatastudio export | jq .
azuredatastudio stats >> report.log
配置
设置 AZUREDATASTUDIO_DIR 环境变量以更改数据目录:
bash
export AZUREDATASTUDIO_DIR=/custom/path/to/azuredatastudio
默认位置:~/.local/share/azuredatastudio/
由 BytesAgain 提供技术支持 | bytesagain.com | hello@bytesagain.com