All skills
secondsky avatar

/sap-hana-cli

@620a19a
by Eddiesecondsky/sap-skills456 stars
120

Assists with SAP HANA Developer CLI (hana-cli) for database development and administration. Use when: installing hana-cli, connecting to SAP HANA databases, inspecting database objects (tables, views, procedures, functions), managing HDI containers, executing SQL queries, converting metadata to CDS/EDMX/OpenAPI formats, managing SAP HANA Cloud instances, working with BTP CLI integration, or troubleshooting hana-cli commands. Covers: 91 commands, 17+ output formats, HDI container management, cloud operations.

Use this Skill: https://skilld.dev/gh/secondsky/sap-skills/sap-hana-cli

This session only. Nothing lands on disk.

referencesmass-operations.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

SAP HANA CLI - Mass Operations Reference

Source: https://github.com/SAP-samples/hana-developer-cli-tool-example/blob/main/utils/massConvert.js

Commands and functions for batch operations on database objects.


Mass Convert Command

massConvert

Batch convert database objects to various formats.

Aliases: mc, massconvert, massConv, massconv

hana-cli massConvert [schema] [table] [view]

UI Alternative: massConvertUI


Conversion Types

HDBTABLE Format

Generates .hdbtable files packaged in ZIP format.

hana-cli massConvert -s MYSCHEMA -o hdbtable

Functions:

  • hdbtableTablesSQL() - SQL-based table conversion
  • hdbtableTables() - CDS-compiled table conversion
  • hdbtableViewsSQL() - SQL-based view conversion
  • hdbtableViews() - CDS-compiled view conversion

HDBMIGRATIONTABLE Format

Generates .hdbmigrationtable files with version headers.

hana-cli massConvert -s MYSCHEMA -o hdbmigrationtable

Functions:

  • hdbmigrationtableTablesSQL() - SQL-based migration format
  • hdbmigrationtableTables() - CDS-compiled migration format

CDS Format

Generates unified .cds source file.

hana-cli massConvert -s MYSCHEMA -o cds

Functions:

  • cdsTables() - Extracts table definitions
  • cdsViews() - Extracts view definitions with parameters

Configuration Options

Option Type Description
useHanaTypes boolean Apply HANA-specific data types
keepPath boolean Preserve namespace paths
noColons boolean Remove colon syntax
useExists boolean Use EXISTS conditions
useQuoted boolean Quote identifiers
useCatalogPure boolean SQL-based catalog extraction
namespace string CDS namespace prefix
limit number Restrict result set size
log boolean Generate JSON audit logs
table string Pattern filter for tables
view string Pattern filter for views

Output Functions

writeZip()

Compresses files using DEFLATE compression.

writeCDS()

Writes unified CDS file containing all entities.

writeSynonyms()

Stores synonym mappings for reference.

writeLog()

Creates JSON execution logs for auditing.


Mass Rename Command

massRename

Batch rename database objects.

hana-cli massRename [schema]

Use Cases:

  • Standardize naming conventions
  • Apply prefixes/suffixes
  • Case conversion

Mass Users Command

massUsers

Bulk user operations.

hana-cli massUsers

Use Cases:

  • Create multiple users
  • Assign roles in bulk
  • User cleanup operations

Workflow Example

Convert Entire Schema to CDS

# Interactive mode
hana-cli massConvert

# Direct specification
hana-cli massConvert -s MYSCHEMA

# With options
hana-cli massConvert -s MYSCHEMA --useHanaTypes --namespace "my.app"

# Generate log file
hana-cli massConvert -s MYSCHEMA --log

Using the UI

# Launch browser-based interface
hana-cli massConvertUI

The UI provides:

  • Schema browser
  • Object selection
  • Preview before conversion
  • Download options

Output Structure

ZIP Archive Contents

output.zip
├── src/
│   ├── CUSTOMERS.hdbtable
│   ├── ORDERS.hdbtable
│   ├── PRODUCTS.hdbtable
│   └── ...
└── synonyms.json (if applicable)

CDS File Structure

namespace my.schema;

entity CUSTOMERS {
  key ID : Integer;
  NAME : String(100);
  EMAIL : String(255);
}

entity ORDERS {
  key ID : Integer;
  CUSTOMER_ID : Integer;
  ORDER_DATE : Date;
}

Best Practices

  1. Test with limit first: Use --limit 10 to verify output format
  2. Review generated files: Check for naming conflicts
  3. Backup before conversion: Preserve original definitions
  4. Use namespaces: Apply consistent CDS namespaces
  5. Enable logging: Track what was converted

*Reference: https://github.com/SAP-samples/hana-developer-cli-tool-example/blob/main/utils/massConvert.js*

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides comprehensive documentation and MCP integration for the SAP HANA Developer CLI. It follow security best practices for credential management by advising the use of environment variables and gitignore for configuration files. All external downloads and package installations refer to official SAP tools and standard development utilities.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    4/17 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 620a19a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 months ago
Other metadata
metadata
{
  "maintainer": "Eduard Jiglau",
  "maintainer_email": "hello@sap-ai-skills.com",
  "website": "https://sap-ai-skills.com",
  "version": "2.4.1",
  "last_verified": "2025-11-26"
}

README badge

README badge for secondsky/sap-skills/sap-hana-cli