Referencia

Ayuda de comandos MCL

Referencia estática compacta para el CLI externo, la superficie MCL actual, APIs HTTP y capacidades de la IDE Web hasta el Milestone 069, con el Milestone 070 planificado.

External CLI

Commands executed from the operating system terminal for setup, tenant provisioning, license administration, and MCL entry.

CLI help and version

Shows CLI commands or the current CLI version.

Implementado

Sintaxis

Metoriq.Cli --help
Metoriq.Cli --version

Ejemplos

Metoriq.Cli --help

setup init / status

Initializes the metadata database or reports setup state.

Implementado

Sintaxis

Metoriq.Cli setup init
Metoriq.Cli setup status

Ejemplos

Metoriq.Cli setup status

tenant administration

Lists, creates, enables, disables, and administers tenants and protected TenantAdmins.

Implementado

Sintaxis

Metoriq.Cli tenants list
Metoriq.Cli tenants create <tenantKey> <name> <tenantAdminKey> <tenantAdminEmail> <tenantAdminPassword> [licensePlan]
Metoriq.Cli tenants disable <tenantKey>
Metoriq.Cli tenants enable <tenantKey>
Metoriq.Cli tenants admins list <tenantKey>
Metoriq.Cli tenants admin set-password <tenantKey> <tenantAdminKey> <newPassword>

Ejemplos

Metoriq.Cli tenants create acme "ACME Corporation" tenantadmin tenantadmin@acme.com "TenantAdmin123!" trial

tenants provision-file

Runs the initial SaaS provisioning flow from a reviewed JSON payload.

Implementado

Sintaxis

Metoriq.Cli tenants provision-file <path>

Ejemplos

Metoriq.Cli tenants provision-file ./tenant-provisioning.json

Notas

  • This is a platform operation, not an MCL command. It creates the tenant, license, initial environment, workspace profile, and owner user transactionally.

tenant license

Shows or changes tenant license metadata from outside MCL.

Implementado

Sintaxis

Metoriq.Cli tenants license show <tenantKey>
Metoriq.Cli tenants license alter <tenantKey> '<json>'
Metoriq.Cli tenants license alter-file <tenantKey> <path>

Ejemplos

Metoriq.Cli tenants license alter-file acme ./license.json

Notas

  • License changes are intentionally external to MCL and generate TENANT_LICENSE audit events.

connect / run

Opens the interactive MCL prompt or executes a .mcl script.

Implementado

Sintaxis

Metoriq.Cli connect <tenantKey> <userKey> <password>
Metoriq.Cli run <tenantKey> <userKey> <password>
Metoriq.Cli run <tenantKey> <userKey> <password> <script.mcl>

Ejemplos

Metoriq.Cli connect acme tenantadmin "TenantAdmin123!"
Metoriq.Cli run acme tenantadmin "TenantAdmin123!" setup-dev.mcl

MCL session

Commands used inside the interactive MCL prompt to navigate, ask for help, and leave the session.

HELP

Shows a short interactive reference for MCL commands and topics.

Implementado

Sintaxis

HELP;
HELP <TOPIC>;

Ejemplos

HELP;
HELP CONNECTION;
HELP WORKSPACE;
HELP READDATA;
HELP WRITEDATA;
HELP TRANSFORMATION;
HELP DATAFLOW;
HELP ACTION;

Notas

  • Current topics include ENVIRONMENT, SCHEMA, CONNECTOR, CONNECTION, WORKSPACE, READDATA, WRITEDATA, TRANSFORMATION, DATAFLOW, ACTION, USER, ROLE, and SESSION.

USE ENVIRONMENT

Sets the active environment for the current MCL session.

Implementado

Sintaxis

USE ENVIRONMENT KEY <environmentKey>;

Ejemplos

USE ENVIRONMENT KEY dev;

LEAVE ENVIRONMENT

Returns the session to tenant scope when the connected user is allowed to do so.

Implementado

Sintaxis

LEAVE ENVIRONMENT;

Ejemplos

LEAVE ENVIRONMENT;

CLEAR / EXIT / QUIT

Clears the interactive terminal or leaves the prompt.

Implementado

Sintaxis

CLEAR;
EXIT;
QUIT;

Ejemplos

CLEAR;
EXIT;

Environment

Commands that manage environments as governed Metoriq objects inside a tenant.

CREATE / ALTER / COPY ENVIRONMENT

Creates, patches, or copies environments.

Implementado

Sintaxis

CREATE ENVIRONMENT KEY <key> PROPERTIES JSON `<json>`;
ALTER ENVIRONMENT KEY <key> PROPERTIES FILE "<path>";
COPY ENVIRONMENT KEY <sourceKey> TO KEY <targetKey>;

Ejemplos

CREATE ENVIRONMENT KEY dev PROPERTIES JSON `{ "name": "Development" }`;

SHOW / DETAIL / DESCRIBE ENVIRONMENT

Lists environments, shows one environment properties JSON, or displays the properties contract.

Implementado

Sintaxis

SHOW ENVIRONMENTS;
DETAIL ENVIRONMENT KEY <key>;
DESCRIBE ENVIRONMENT PROPERTIES;

Ejemplos

SHOW ENVIRONMENTS;

GENERATE ENVIRONMENT

Generates MCL commands from the current environment state.

Implementado

Sintaxis

GENERATE <ACTION> ENVIRONMENT KEY <key>;

Ejemplos

GENERATE ALTER ENVIRONMENT KEY dev;

ENABLE / DISABLE / DELETE ENVIRONMENT

Changes environment status or removes a disabled environment.

Implementado

Sintaxis

ENABLE ENVIRONMENT KEY <key>;
DISABLE ENVIRONMENT KEY <key>;
DELETE ENVIRONMENT KEY <key>;
DELETE ENVIRONMENT KEY <key> CASCADE;

Ejemplos

DISABLE ENVIRONMENT KEY dev;

DEPENDENTS ENVIRONMENT

Lists direct objects that depend on the environment.

Implementado

Sintaxis

DEPENDENTS ENVIRONMENT KEY <key>;

Ejemplos

DEPENDENTS ENVIRONMENT KEY dev;

Schema

Commands that manage logical namespaces inside the active environment.

SHOW / DETAIL / DESCRIBE SCHEMA

Lists schemas, shows a schema, shows schema properties, or lists objects inside a schema.

Implementado

Sintaxis

SHOW SCHEMAS;
SHOW SCHEMA KEY <schemaKey>;
SHOW SCHEMA KEY <schemaKey> OBJECTS;
DETAIL SCHEMA KEY <schemaKey>;
DESCRIBE SCHEMA PROPERTIES;

Ejemplos

SHOW SCHEMA KEY public OBJECTS;

CREATE / ALTER / DELETE SCHEMA

Creates, patches, or deletes non-reserved logical schemas.

Implementado

Sintaxis

CREATE SCHEMA KEY <schemaKey> PROPERTIES JSON `<json>`;
ALTER SCHEMA KEY <schemaKey> PROPERTIES FILE "<path>";
DELETE SCHEMA KEY <schemaKey>;

Ejemplos

CREATE SCHEMA KEY finance PROPERTIES JSON `{ "name": "Finance" }`;

Notas

  • The reserved public schema is created automatically and cannot be renamed or deleted.

Connector types

Read-only commands for connector capabilities available to the installation.

SHOW CONNECTOR TYPES

Lists connector types registered in the installation.

Implementado

Sintaxis

SHOW CONNECTOR TYPES;

Ejemplos

SHOW CONNECTOR TYPES;

DETAIL CONNECTOR TYPE

Shows capabilities and connection properties schema for a connector type.

Implementado

Sintaxis

DETAIL CONNECTOR TYPE KEY <typeKey>;

Ejemplos

DETAIL CONNECTOR TYPE KEY postgresql;

Connections

Commands that manage schema-qualified connection metadata, connection secrets, generated commands, and PostgreSQL connectivity tests.

CREATE CONNECTION

Creates a connection metadata object using an existing connector type. PostgreSQL password can be provided and is stored as a connection secret.

Implementado

Sintaxis

CREATE CONNECTION KEY <connectionKey> TYPE <typeKey> PROPERTIES JSON `<json>`;
CREATE CONNECTION KEY <schemaKey>.<connectionKey> TYPE <typeKey> PROPERTIES FILE "<path>";

Ejemplos

CREATE CONNECTION KEY public.source_db TYPE postgresql PROPERTIES JSON `{ "name": "Source DB", "host": "localhost", "port": 5432, "database": "source_db", "username": "postgres", "password": "postgres", "ssl_mode": "disable" }`;

Notas

  • password is removed from persisted properties_json and represented as secret_reference: "connection:password".
  • connection_string must not contain Password or Pwd.

ALTER CONNECTION

Applies a patch to connection properties and can rotate the associated secret.

Implementado

Sintaxis

ALTER CONNECTION KEY <connectionKey> PROPERTIES JSON `<json>`;
ALTER CONNECTION KEY <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";

Ejemplos

ALTER CONNECTION KEY public.source_db PROPERTIES JSON `{ "description": "Source DB rotated", "password": "new-secret" }`;

Notas

  • Omitting password preserves the current secret.

SHOW / DETAIL CONNECTION

Lists connections or shows connection properties.

Implementado

Sintaxis

SHOW CONNECTIONS;
DETAIL CONNECTION KEY <connectionKey>;
DETAIL CONNECTION KEY <schemaKey>.<connectionKey>;

Ejemplos

DETAIL CONNECTION KEY public.source_db;

GENERATE CONNECTION

Generates sanitized MCL commands for a connection without exposing secrets.

Implementado

Sintaxis

GENERATE CREATE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE ALTER CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE ENABLE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE DISABLE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE DELETE CONNECTION KEY <schemaKey>.<connectionKey>;
GENERATE DETAIL CONNECTION KEY <schemaKey>.<connectionKey>;

Ejemplos

GENERATE CREATE CONNECTION KEY public.source_db;

TEST CONNECTION

Opens a real connector test for the configured connection. PostgreSQL is the first implemented tester.

Implementado

Sintaxis

TEST CONNECTION KEY <connectionKey>;
TEST CONNECTION KEY <schemaKey>.<connectionKey>;

Ejemplos

TEST CONNECTION KEY public.source_db;

Notas

  • TEST CONNECTION does not read or write data and does not generate audit in the initial cut.

ENABLE / DISABLE / DELETE CONNECTION

Changes connection status or removes a disabled connection.

Implementado

Sintaxis

ENABLE CONNECTION KEY <schemaKey>.<connectionKey>;
DISABLE CONNECTION KEY <schemaKey>.<connectionKey>;
DELETE CONNECTION KEY <schemaKey>.<connectionKey>;

Ejemplos

DISABLE CONNECTION KEY public.source_db;

Workspace profile

Commands that configure, inspect, test, and clean up the PostgreSQL workspace used by the active environment.

CONFIGURE WORKSPACE PROFILE

Creates or updates the workspace profile for the active environment. Password is stored as a workspace secret, not in functional JSON.

Implementado

Sintaxis

CONFIGURE WORKSPACE PROFILE PROPERTIES JSON `<json>`;
CONFIGURE WORKSPACE PROFILE PROPERTIES FILE "<path>";

Ejemplos

CONFIGURE WORKSPACE PROFILE PROPERTIES JSON `{ "name": "DEV Workspace", "provider": "postgresql", "host": "localhost", "port": 5432, "database": "metoriq_workspace", "username": "postgres", "password": "postgres", "ssl_mode": "disable", "managed_by_metoriq": false, "provisioning_mode": "existing_database" }`;

Notas

  • The first supported operational mode is existing_database.

SHOW / DETAIL / DESCRIBE WORKSPACE PROFILE

Shows workspace state, sanitized details, or the accepted properties contract.

Implementado

Sintaxis

SHOW WORKSPACE PROFILE;
DETAIL WORKSPACE PROFILE;
DESCRIBE WORKSPACE PROFILE PROPERTIES;

Ejemplos

SHOW WORKSPACE PROFILE;

TEST WORKSPACE PROFILE

Validates PostgreSQL connectivity and minimum permissions for the workspace by creating and removing technical temporary objects.

Implementado

Sintaxis

TEST WORKSPACE PROFILE;

Ejemplos

TEST WORKSPACE PROFILE;

Notas

  • Successful tests mark the profile ready; failed tests mark it failed.

PURGE WORKSPACE ARTIFACTS

Safely removes registered Metoriq run schemas from the workspace.

Implementado

Sintaxis

PURGE WORKSPACE ARTIFACTS DRY RUN;
PURGE WORKSPACE ARTIFACTS FOR RUN "<run_id>";
PURGE WORKSPACE ARTIFACTS OLDER THAN "<duration>";

Ejemplos

PURGE WORKSPACE ARTIFACTS DRY RUN;
PURGE WORKSPACE ARTIFACTS OLDER THAN "2h";

Notas

  • Purge only targets registered artifacts that follow Metoriq workspace naming conventions.
  • Manual purge generates WORKSPACE_ARTIFACTS audit events when artifacts are removed.

READDATA preview and RAW execute

Commands that define a PostgreSQL read operation, preview source rows, and execute RAW landing into the workspace.

CREATE / ALTER READDATA

Creates or patches a schema-qualified READDATA object that uses an existing connection.

Implementado

Sintaxis

CREATE READDATA KEY <readDataKey> USING CONNECTION <connectionKey> PROPERTIES JSON `<json>`;
CREATE READDATA KEY <schemaKey>.<readDataKey> USING CONNECTION <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";
ALTER READDATA KEY <schemaKey>.<readDataKey> PROPERTIES JSON `<json>`;
ALTER READDATA KEY <schemaKey>.<readDataKey> PROPERTIES FILE "<path>";

Ejemplos

CREATE READDATA KEY public.dim_brand USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Dim Brand", "mode": "query", "query": "SELECT * FROM dbo.\"Dim_Brand\"", "preview_limit": 20 }`;
CREATE READDATA KEY public.dim_category USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Dim Category", "mode": "query", "query_file": "./sql/dim_category.sql", "preview_limit": 20 }`;

Notas

  • query_file is expanded by the authoring client and only query is persisted.

SHOW / DETAIL READDATA

Lists READDATA objects or shows their functional properties.

Implementado

Sintaxis

SHOW READDATA;
DETAIL READDATA KEY <schemaKey>.<readDataKey>;

Ejemplos

DETAIL READDATA KEY public.dim_brand;

DESCRIBE READDATA OUTPUT

Opens the source and returns the output contract: columns, canonical types, nullability, and logical primary key.

Implementado

Sintaxis

DESCRIBE READDATA KEY <schemaKey>.<readDataKey> OUTPUT;

Ejemplos

DESCRIBE READDATA KEY public.dim_brand OUTPUT;

PREVIEW READDATA

Reads a limited sample from PostgreSQL and returns rows without persisting RAW or a run.

Implementado

Sintaxis

PREVIEW READDATA KEY <schemaKey>.<readDataKey>;
PREVIEW READDATA KEY <schemaKey>.<readDataKey> LIMIT <rows>;

Ejemplos

PREVIEW READDATA KEY public.dim_brand LIMIT 5;

Notas

  • LIMIT is a one-time override between 1 and 1000.

EXECUTE READDATA

Reads PostgreSQL rows and lands them into a RAW table in the configured workspace.

Implementado

Sintaxis

EXECUTE READDATA KEY <schemaKey>.<readDataKey>;

Ejemplos

EXECUTE READDATA KEY public.dim_brand;

Notas

  • Requires a ready WORKSPACE PROFILE in the active environment.
  • Creates a run_id, a physical metoriq_run_* schema, a raw_* table, and registered workspace artifacts.

GENERATE READDATA

Generates MCL commands from the current READDATA object.

Implementado

Sintaxis

GENERATE CREATE READDATA KEY <schemaKey>.<readDataKey>;
GENERATE ALTER READDATA KEY <schemaKey>.<readDataKey>;
GENERATE DESCRIBE READDATA KEY <schemaKey>.<readDataKey>;
GENERATE DETAIL READDATA KEY <schemaKey>.<readDataKey>;
GENERATE PREVIEW READDATA KEY <schemaKey>.<readDataKey>;

Ejemplos

GENERATE CREATE READDATA KEY public.dim_brand;

WRITEDATA catalog, check, and execute

Commands that define a PostgreSQL write metadata object, validate its target table, and execute append writes through the shared DATAFLOW runtime.

CREATE / ALTER WRITEDATA

Creates or patches a schema-qualified WRITEDATA object that uses a destination connection and references a dataset producer.

Implementado

Sintaxis

CREATE WRITEDATA KEY <writeDataKey> USING CONNECTION <connectionKey> PROPERTIES JSON `<json>`;
CREATE WRITEDATA KEY <schemaKey>.<writeDataKey> USING CONNECTION <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";
ALTER WRITEDATA KEY <schemaKey>.<writeDataKey> PROPERTIES JSON `<json>`;
ALTER WRITEDATA KEY <schemaKey>.<writeDataKey> PROPERTIES FILE "<path>";

Ejemplos

CREATE WRITEDATA KEY public.write_dim_brand USING CONNECTION public.target_db PROPERTIES JSON `{ "name": "Write Dim Brand", "source": "{{public.dim_brand}}", "target_table": "dbo.dim_brand", "mode": "append", "column_mapping": { "Cod_Brand": "cod_brand", "Desc_Brand": "desc_brand" } }`;

Notas

  • source must use {{schema.object}} and can resolve to READDATA or TRANSFORMATION.
  • append is the only implemented mode in Milestone 011.

SHOW / DETAIL / DESCRIBE WRITEDATA

Lists WRITEDATA objects, shows functional properties, or displays the accepted properties contract.

Implementado

Sintaxis

SHOW WRITEDATA;
DETAIL WRITEDATA KEY <schemaKey>.<writeDataKey>;
DESCRIBE WRITEDATA PROPERTIES;

Ejemplos

DETAIL WRITEDATA KEY public.write_dim_brand;

CHECK WRITEDATA

Validates metadata, resolves the source READDATA, opens the destination PostgreSQL connection, and verifies that the target table exists.

Implementado

Sintaxis

CHECK WRITEDATA KEY <schemaKey>.<writeDataKey>;

Ejemplos

CHECK WRITEDATA KEY public.write_dim_brand;

Notas

  • CHECK WRITEDATA does not move rows and does not generate audit in this initial cut.

GENERATE WRITEDATA

Generates MCL commands from the current WRITEDATA object.

Implementado

Sintaxis

GENERATE CREATE WRITEDATA KEY <schemaKey>.<writeDataKey>;
GENERATE ALTER WRITEDATA KEY <schemaKey>.<writeDataKey>;
GENERATE DETAIL WRITEDATA KEY <schemaKey>.<writeDataKey>;
GENERATE CHECK WRITEDATA KEY <schemaKey>.<writeDataKey>;

Ejemplos

GENERATE CREATE WRITEDATA KEY public.write_dim_brand;

EXECUTE WRITEDATA

Executes one WRITEDATA output and its dependencies through the shared DATAFLOW runtime.

Implementado

Sintaxis

EXECUTE WRITEDATA KEY <schemaKey>.<writeDataKey>;

Ejemplos

EXECUTE WRITEDATA KEY public.write_dim_brand;

Notas

  • Runs mandatory graph preflight before materializing workspace objects or writing rows.

TRANSFORMATION catalog and preview

Commands that define SQL transformations, inspect their output contract, and preview results through a disposable workspace run.

CREATE / ALTER TRANSFORMATION

Creates or patches a schema-qualified TRANSFORMATION object that produces an intermediate DATASET.

Implementado

Sintaxis

CREATE TRANSFORMATION KEY <transformationKey> PROPERTIES JSON `<json>`;
CREATE TRANSFORMATION KEY <schemaKey>.<transformationKey> PROPERTIES FILE "<path>";
ALTER TRANSFORMATION KEY <schemaKey>.<transformationKey> PROPERTIES JSON `<json>`;
ALTER TRANSFORMATION KEY <schemaKey>.<transformationKey> PROPERTIES FILE "<path>";

Ejemplos

CREATE TRANSFORMATION KEY public.dim_brand_category PROPERTIES JSON `{ "name": "Dim Brand Category", "mode": "sql_view", "query": "SELECT c.cod_category, c.desc_category, b.cod_brand, b.desc_brand FROM {{public.dim_category}} c JOIN {{public.dim_brand}} b ON c.cod_category = b.cod_category", "preview_limit": 20, "primary_key": ["cod_brand"] }`;

Notas

  • query_file is expanded during authoring and only query is persisted.
  • Queries reference READDATA or TRANSFORMATION producers with placeholders such as {{public.dim_brand}}.

SHOW / DETAIL / DESCRIBE TRANSFORMATION

Lists TRANSFORMATION objects, shows properties, or describes the output contract.

Implementado

Sintaxis

SHOW TRANSFORMATIONS;
DETAIL TRANSFORMATION KEY <schemaKey>.<transformationKey>;
DESCRIBE TRANSFORMATION KEY <schemaKey>.<transformationKey> OUTPUT;
DESCRIBE TRANSFORMATION PROPERTIES;

Ejemplos

DESCRIBE TRANSFORMATION KEY public.dim_brand_category OUTPUT;

PREVIEW TRANSFORMATION

Creates a disposable preview run, materializes dependencies, creates temporary transformation views, returns a sample, and cleans up the workspace.

Implementado

Sintaxis

PREVIEW TRANSFORMATION KEY <schemaKey>.<transformationKey>;
PREVIEW TRANSFORMATION KEY <schemaKey>.<transformationKey> LIMIT <rows>;

Ejemplos

PREVIEW TRANSFORMATION KEY public.dim_brand_category LIMIT 5;

Notas

  • Requires a ready WORKSPACE PROFILE.
  • Transformation SQL must use normalized RAW column names.

GENERATE TRANSFORMATION

Generates MCL commands from the current TRANSFORMATION object.

Implementado

Sintaxis

GENERATE CREATE TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE ALTER TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE DETAIL TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE DESCRIBE TRANSFORMATION KEY <schemaKey>.<transformationKey>;
GENERATE PREVIEW TRANSFORMATION KEY <schemaKey>.<transformationKey>;

Ejemplos

GENERATE CREATE TRANSFORMATION KEY public.dim_brand_category;

DATAFLOW catalog, check, and execute

Commands that define output sets, validate the inferred graph, and execute WRITEDATA outputs.

CREATE / ALTER DATAFLOW

Creates or patches a schema-qualified DATAFLOW object whose outputs initially reference WRITEDATA objects.

Implementado

Sintaxis

CREATE DATAFLOW KEY <dataflowKey> PROPERTIES JSON `<json>`;
CREATE DATAFLOW KEY <schemaKey>.<dataflowKey> PROPERTIES FILE "<path>";
ALTER DATAFLOW KEY <schemaKey>.<dataflowKey> PROPERTIES JSON `<json>`;
ALTER DATAFLOW KEY <schemaKey>.<dataflowKey> PROPERTIES FILE "<path>";

Ejemplos

CREATE DATAFLOW KEY public.load_dimensions PROPERTIES JSON `{ "name": "Load Dimensions", "outputs": ["{{public.write_dim_brand}}", "{{public.write_dim_category}}"] }`;

Notas

  • outputs accepts WRITEDATA references in this initial cut.

SHOW / DETAIL / DESCRIBE DATAFLOW

Lists DATAFLOW objects, shows properties, or displays the accepted properties contract.

Implementado

Sintaxis

SHOW DATAFLOWS;
DETAIL DATAFLOW KEY <schemaKey>.<dataflowKey>;
DESCRIBE DATAFLOW PROPERTIES;

Ejemplos

DETAIL DATAFLOW KEY public.load_dimensions;

CHECK DATAFLOW

Builds the logical DAG from WRITEDATA.source and TRANSFORMATION dependencies, then validates references, types, cycles, and READDATA reachability.

Implementado

Sintaxis

CHECK DATAFLOW KEY <schemaKey>.<dataflowKey>;

Ejemplos

CHECK DATAFLOW KEY public.load_dimensions;

Notas

  • CHECK DATAFLOW does not execute data physically.

GENERATE DATAFLOW

Generates MCL commands from the current DATAFLOW object.

Implementado

Sintaxis

GENERATE CREATE DATAFLOW KEY <schemaKey>.<dataflowKey>;
GENERATE ALTER DATAFLOW KEY <schemaKey>.<dataflowKey>;
GENERATE DETAIL DATAFLOW KEY <schemaKey>.<dataflowKey>;
GENERATE CHECK DATAFLOW KEY <schemaKey>.<dataflowKey>;

Ejemplos

GENERATE CHECK DATAFLOW KEY public.load_dimensions;

EXECUTE DATAFLOW

Executes all WRITEDATA outputs declared by the DATAFLOW after mandatory graph preflight.

Implementado

Sintaxis

EXECUTE DATAFLOW KEY <schemaKey>.<dataflowKey>;

Ejemplos

EXECUTE DATAFLOW KEY public.load_dimensions;

Notas

  • Creates a run, workspace artifacts, runtime steps, and structured events.

Users and roles

Initial identity, password, environment access, and role commands.

USER object commands

Creates, patches, copies, lists, details, generates, enables, disables, and deletes tenant users.

Implementado

Sintaxis

DESCRIBE USER PROPERTIES;
CREATE USER KEY <userKey> PROPERTIES JSON `<json>`;
ALTER USER KEY <userKey> PROPERTIES FILE "<path>";
COPY USER KEY <sourceKey> TO KEY <targetKey>;
SHOW USERS;
DETAIL USER KEY <userKey>;
GENERATE CREATE USER KEY <userKey>;
ENABLE USER KEY <userKey>;
DISABLE USER KEY <userKey>;
DELETE USER KEY <userKey>;

Ejemplos

CREATE USER KEY joao PROPERTIES JSON `{ "display_name": "Joao Silva", "email": "joao@acme.com" }`;

SET PASSWORD

Defines an explicit password for bootstrap, validation, and controlled scripts.

Implementado

Sintaxis

SET PASSWORD FOR USER KEY <userKey> TO "<password>";

Ejemplos

SET PASSWORD FOR USER KEY joao TO "Joao123!";

Notas

  • The command obeys the tenant password_policy.

ROLE access commands

Grants and revokes roles per environment, lists access, and sets default environment.

Implementado

Sintaxis

GRANT ROLE <roleKey> TO USER KEY <userKey> ON ENVIRONMENT KEY <environmentKey>;
REVOKE ROLE <roleKey> FROM USER KEY <userKey> ON ENVIRONMENT KEY <environmentKey>;
SHOW USER KEY <userKey> ROLES;
SHOW ENVIRONMENT KEY <environmentKey> USERS;
SET DEFAULT ENVIRONMENT KEY <environmentKey> FOR USER KEY <userKey>;

Ejemplos

GRANT ROLE designer TO USER KEY joao ON ENVIRONMENT KEY dev;

Tenant administration

Tenant settings, license view, and audit commands available from MCL.

TENANT SETTINGS

Shows or patches tenant settings and imports/exports operational INI files.

Implementado

Sintaxis

SHOW TENANT SETTINGS;
ALTER TENANT SETTINGS PROPERTIES JSON `<json>`;
ALTER TENANT SETTINGS PROPERTIES FILE "<path>";
EXPORT TENANT SETTINGS TO FILE "<path>";
IMPORT TENANT SETTINGS FROM FILE "<path>";

Ejemplos

ALTER TENANT SETTINGS PROPERTIES JSON `{ "password_policy": { "min_length": 14 } }`;

SHOW TENANT LICENSE

Shows tenant license metadata from MCL.

Implementado

Sintaxis

SHOW TENANT LICENSE;

Ejemplos

SHOW TENANT LICENSE;

Notas

  • License changes are made by external CLI commands, not MCL.

SHOW / PURGE AUDIT EVENTS

Lists or purges administrative audit events.

Implementado

Sintaxis

SHOW AUDIT EVENTS;
SHOW AUDIT EVENTS SINCE "<yyyy-MM-dd>";
SHOW AUDIT EVENTS UNTIL "<yyyy-MM-dd>";
SHOW AUDIT EVENTS FOR USER KEY <userKey>;
SHOW AUDIT EVENTS FOR OBJECT <OBJECT_TYPE> KEY <objectKey>;
PURGE AUDIT EVENTS BEFORE "<yyyy-MM-dd>";

Ejemplos

SHOW AUDIT EVENTS FOR OBJECT ENVIRONMENT KEY dev;

Usage and license policy

Commands and behaviors added for SaaS entitlements, usage metering, and license enforcement.

SHOW TENANT USAGE

Shows tenant-level runtime usage for the current or selected yyyy-MM period.

Implementado

Sintaxis

SHOW TENANT USAGE;
SHOW TENANT USAGE PERIOD "<yyyy-MM>";

Ejemplos

SHOW TENANT USAGE PERIOD "2026-06";

Notas

  • Usage aggregates runs, statuses, run types, runtime minutes, rows, events, workspace artifacts, and observed concurrency.

SHOW ENVIRONMENT USAGE

Shows environment-level runtime usage for the current or selected yyyy-MM period.

Implementado

Sintaxis

SHOW ENVIRONMENT USAGE;
SHOW ENVIRONMENT USAGE PERIOD "<yyyy-MM>";

Ejemplos

SHOW ENVIRONMENT USAGE;

License enforcement

Central policy checks apply active license state, validity, limits, and enabled features before catalog changes and runtime execution.

Implementado

Sintaxis

CREATE USER KEY <userKey> PROPERTIES JSON `<json>`;
CREATE ENVIRONMENT KEY <environmentKey> PROPERTIES JSON `<json>`;
EXECUTE DATAFLOW KEY <dataflowKey>;
EXECUTE FLOW KEY <flowKey>;

Ejemplos

EXECUTE FLOW KEY public.daily_load;

Notas

  • Blocks generate localized human-facing messages and LICENSE_BLOCK audit events.

Runtime runs and logs

Commands that inspect data-plane runs, steps, structured events, retention defaults, and purge runtime logs.

SHOW RUNS

Lists recent data-plane runs for the active environment.

Implementado

Sintaxis

SHOW RUNS;

Ejemplos

SHOW RUNS;

SHOW RUN KEY

Shows a run summary, step list, or structured runtime logs.

Implementado

Sintaxis

SHOW RUN KEY <run_id>;
SHOW RUN KEY <run_id> STEPS;
SHOW RUN KEY <run_id> LOGS;
SHOW RUN KEY <run_id> LOGS LEVEL ERROR;

Ejemplos

SHOW RUN KEY "<run_id>" LOGS LEVEL ERROR;

Notas

  • EXECUTE READDATA and PREVIEW TRANSFORMATION register run, step, and event records.

SHOW RUN LOG RETENTION POLICY

Shows fixed documented defaults for runtime run and event retention.

Implementado

Sintaxis

SHOW RUN LOG RETENTION POLICY;

Ejemplos

SHOW RUN LOG RETENTION POLICY;

PURGE RUN LOGS

Purges runtime events by age or run id, with DRY RUN support.

Implementado

Sintaxis

PURGE RUN LOGS OLDER THAN "<duration>" DRY RUN;
PURGE RUN LOGS OLDER THAN "<duration>";
PURGE RUN LOGS FOR RUN "<run_id>" DRY RUN;
PURGE RUN LOGS FOR RUN "<run_id>";

Ejemplos

PURGE RUN LOGS OLDER THAN "30d" DRY RUN;
PURGE RUN LOGS FOR RUN "<run_id>";

Notas

  • Effective purge generates RUN_LOGS audit events.
  • Raw technical logs and custom retention policies remain future work.

ACTION catalog and execute

Commands that catalog direct connector operations such as PostgreSQL SQL commands and execute them as operational runs.

CREATE / ALTER ACTION

Creates or patches a schema-qualified ACTION object that uses an existing connection.

Implementado

Sintaxis

CREATE ACTION KEY <actionKey> USING CONNECTION <connectionKey> PROPERTIES JSON `<json>`;
CREATE ACTION KEY <schemaKey>.<actionKey> USING CONNECTION <schemaKey>.<connectionKey> PROPERTIES FILE "<path>";
ALTER ACTION KEY <schemaKey>.<actionKey> PROPERTIES JSON `<json>`;
ALTER ACTION KEY <schemaKey>.<actionKey> PROPERTIES FILE "<path>";

Ejemplos

CREATE ACTION KEY public.insert_product_test USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Insert product test", "mode": "sql_command", "command": "INSERT INTO dbo.\"Dim_Product\"(\"Cod_Product\", \"Desc_Product\") VALUES ('943221', 'Produto Teste')" }`;
CREATE ACTION KEY public.insert_product_test_file USING CONNECTION public.source_db PROPERTIES JSON `{ "name": "Insert product test file", "mode": "sql_command", "command_file": "./sql/insert_product_test.sql" }`;

Notas

  • command_file follows the SQL file expansion rule and only command is persisted.

SHOW / DETAIL ACTION

Lists ACTION objects or shows their functional properties.

Implementado

Sintaxis

SHOW ACTIONS;
DETAIL ACTION KEY <schemaKey>.<actionKey>;

Ejemplos

DETAIL ACTION KEY public.insert_product_test;

GENERATE ACTION

Generates MCL commands from the current ACTION object.

Implementado

Sintaxis

GENERATE CREATE ACTION KEY <schemaKey>.<actionKey>;
GENERATE ALTER ACTION KEY <schemaKey>.<actionKey>;
GENERATE DETAIL ACTION KEY <schemaKey>.<actionKey>;

Ejemplos

GENERATE CREATE ACTION KEY public.insert_product_test;

EXECUTE ACTION

Executes an ACTION, initially PostgreSQL sql_command, and records run, step, and event metadata.

Implementado

Sintaxis

EXECUTE ACTION KEY <schemaKey>.<actionKey>;

Ejemplos

EXECUTE ACTION KEY public.insert_product_test;

Notas

  • Successful SQL returns success; SQL failure returns a controlled error visible in run logs.

TASK catalog

Commands that define atomic executable units used by FLOW orchestration.

CREATE / ALTER TASK

Creates or patches a schema-qualified TASK of type writedata, dataflow, action, flow, or status.

Implementado

Sintaxis

CREATE TASK KEY <taskKey> TYPE <type> PROPERTIES JSON `<json>`;
CREATE TASK KEY <schemaKey>.<taskKey> TYPE <type> PROPERTIES FILE "<path>";
ALTER TASK KEY <schemaKey>.<taskKey> PROPERTIES JSON `<json>`;

Ejemplos

CREATE TASK KEY public.load_brand TYPE writedata PROPERTIES JSON `{ "name": "Load Brand", "target": "{{public.write_dim_brand}}" }`;

SHOW / DETAIL / DESCRIBE TASK

Lists TASK objects, shows one task, or displays the accepted properties contract.

Implementado

Sintaxis

SHOW TASKS;
DETAIL TASK KEY <schemaKey>.<taskKey>;
DESCRIBE TASK PROPERTIES;

Ejemplos

SHOW TASKS;

GENERATE TASK

Generates MCL commands from the current TASK object.

Implementado

Sintaxis

GENERATE CREATE TASK KEY <schemaKey>.<taskKey>;
GENERATE ALTER TASK KEY <schemaKey>.<taskKey>;
GENERATE DETAIL TASK KEY <schemaKey>.<taskKey>;

Ejemplos

GENERATE CREATE TASK KEY public.load_brand;

FLOW catalog, check, and execute

Commands that define task graphs, validate orchestration, and execute flows sequentially by eligibility.

CREATE / ALTER FLOW

Creates or patches a schema-qualified FLOW from JSON or file properties.

Implementado

Sintaxis

CREATE FLOW KEY <flowKey> PROPERTIES JSON `<json>`;
CREATE FLOW KEY <schemaKey>.<flowKey> PROPERTIES FILE "<path>";
ALTER FLOW KEY <schemaKey>.<flowKey> PROPERTIES JSON `<json>`;

Ejemplos

CREATE FLOW KEY public.daily_load PROPERTIES JSON `{ "name": "Daily Load", "tasks": ["{{public.load_dimensions}}"] }`;

ADD / REMOVE FLOW TASK / EDGE

Edits a FLOW graph incrementally by adding/removing tasks and conditional edges.

Implementado

Sintaxis

ADD FLOW TASK KEY <flowKey> TASK KEY <taskKey>;
REMOVE FLOW TASK KEY <flowKey> TASK KEY <taskKey>;
ADD FLOW EDGE KEY <flowKey> FROM TASK KEY <fromTaskKey> TO TASK KEY <toTaskKey> ON <success|error|always>;
REMOVE FLOW EDGE KEY <flowKey> FROM TASK KEY <fromTaskKey> TO TASK KEY <toTaskKey> ON <success|error|always>;

Ejemplos

ADD FLOW EDGE KEY public.daily_load FROM TASK KEY public.load_dimensions TO TASK KEY public.mark_success ON success;

SHOW / DETAIL / DESCRIBE FLOW

Lists FLOW objects, shows properties, tasks, edges, or the accepted properties contract.

Implementado

Sintaxis

SHOW FLOWS;
DETAIL FLOW KEY <schemaKey>.<flowKey>;
SHOW FLOW KEY <schemaKey>.<flowKey> TASKS;
SHOW FLOW KEY <schemaKey>.<flowKey> EDGES;
DESCRIBE FLOW PROPERTIES;

Ejemplos

SHOW FLOW KEY public.daily_load TASKS;

CHECK FLOW

Validates tasks, targets, edges, cycles, subflows, TASKSTATUS usage, and runnable graph structure.

Implementado

Sintaxis

CHECK FLOW KEY <schemaKey>.<flowKey>;

Ejemplos

CHECK FLOW KEY public.daily_load;

EXECUTE FLOW

Executes a FLOW sequentially by task eligibility/topology, including writedata, dataflow, action, flow, and status tasks.

Implementado

Sintaxis

EXECUTE FLOW KEY <schemaKey>.<flowKey>;

Ejemplos

EXECUTE FLOW KEY public.daily_load;

Notas

  • Runs CHECK FLOW preflight before executing tasks.
  • Task result conditions are success, error, and always.

VARIABLES catalog, loading, and expansion

Commands that create typed variables, load values from READDATA, and expand vector variables during checks and executions.

CREATE / ALTER VARIABLE

Creates or patches typed variables in environment, flow, or task scope.

Implementado

Sintaxis

CREATE VARIABLE KEY <variableKey> SCOPE ENVIRONMENT PROPERTIES JSON `<json>`;
CREATE VARIABLE KEY <variableKey> SCOPE FLOW KEY <flowKey> PROPERTIES JSON `<json>`;
CREATE VARIABLE KEY <variableKey> SCOPE TASK KEY <taskKey> PROPERTIES JSON `<json>`;
ALTER VARIABLE KEY <variableKey> PROPERTIES JSON `<json>`;

Ejemplos

CREATE VARIABLE KEY DATA_REF SCOPE ENVIRONMENT PROPERTIES JSON `{ "name": "Data reference", "data_type": "date", "value": "2026-06-23" }`;

Notas

  • Supported data types include string, number, boolean, date, datetime, and vector.

SHOW / DETAIL / DELETE VARIABLE

Lists, details, or removes variables from the visible or object-specific scope.

Implementado

Sintaxis

SHOW VARIABLES;
SHOW VARIABLES SCOPE FLOW KEY <flowKey>;
SHOW VARIABLES SCOPE TASK KEY <taskKey>;
DETAIL VARIABLE KEY <variableKey>;
DELETE VARIABLE KEY <variableKey>;

Ejemplos

SHOW VARIABLES;
SHOW VARIABLES SCOPE FLOW KEY public.daily_load;

SET / UNSET VARIABLE

Creates or updates a temporary session/run variable, or removes it from the current session.

Implementado

Sintaxis

SET VARIABLE <variableKey> = "<value>";
SET VARIABLE <variableKey> PROPERTIES JSON `<json>`;
UNSET VARIABLE <variableKey>;

Ejemplos

SET VARIABLE DATA_REF = "2026-06-23";

SET VARIABLE FROM READDATA

Loads a vector variable from a READDATA column for operational loops and dynamic values.

Implementado

Sintaxis

SET VARIABLE <variableKey> FROM READDATA KEY <schemaKey>.<readDataKey> COLUMN <columnName>;

Ejemplos

SET VARIABLE FILES FROM READDATA KEY public.pending_xml_files COLUMN file_name;

Notas

  • The result is always a vector; one-item vectors behave as scalars during expansion.

VARIABLES MODE

Controls vector expansion during CHECK or EXECUTE commands.

Implementado

Sintaxis

CHECK FLOW KEY <flowKey> VARIABLES MODE POSITIONAL_FILL_LAST;
EXECUTE FLOW KEY <flowKey> VARIABLES MODE CARTESIAN;
EXECUTE DATAFLOW KEY <dataflowKey> VARIABLES MODE CARTESIAN;
EXECUTE ACTION KEY <actionKey> VARIABLES MODE CARTESIAN;

Ejemplos

EXECUTE FLOW KEY public.import_all VARIABLES MODE CARTESIAN;

Notas

  • Default mode is positional_fill_last.
  • Cartesian mode is explicit to avoid accidental execution explosions.

Version and localization

Commands and behavior related to product version, stable message codes, locale fallback, and localized MCL responses.

VERSION

Shows the Metoriq product version from the central .NET build version.

Implementado

Sintaxis

VERSION;

Ejemplos

VERSION;

Notas

  • The current product version is sourced centrally and is aligned with milestone versioning policy.

HELP VERSION

Shows localized help for the VERSION command.

Implementado

Sintaxis

HELP VERSION;

Ejemplos

HELP VERSION;

Localized MCL messages

Human-facing MCL success, error, warning, help, validation, and runtime messages use stable message codes with localized rendering.

Implementado

Sintaxis

HELP;
VERSION;
SHOW RUN KEY <run_id> LOGS;

Ejemplos

HELP;

Notas

  • MCL command syntax, object types, JSON property names, keys, SQL, paths, and technical payloads remain in English/canonical form.
  • Supported initial locales are en-US, pt-BR, and es-ES with fallback to English.

HTTP APIs and Web IDE

Product surfaces added after the CLI/MCL foundation for platform automation, tenant runtime reads, MCL execution, and the browser IDE.

Platform API

Operational HTTP endpoints for setup/status and SaaS tenant provisioning.

Implementado

Sintaxis

GET /api/platform/status
POST /api/platform/tenants/provision

Ejemplos

POST /api/platform/tenants/provision

Notas

  • Platform endpoints are protected by an operational token and are not user MCL credentials.

Tenant Runtime API

Read-oriented tenant HTTP API for environments, schemas, objects, runs, usage, and license status.

Implementado

Sintaxis

GET /api/tenants/{tenantKey}/environments
GET /api/tenants/{tenantKey}/environments/{environmentKey}/objects
GET /api/tenants/{tenantKey}/environments/{environmentKey}/runs
GET /api/tenants/{tenantKey}/license/status

Ejemplos

GET /api/tenants/acme/environments/dev/objects

MCL execution API

Authenticated endpoint used by official clients to execute MCL and receive structured results.

Implementado

Sintaxis

POST /api/tenants/{tenantKey}/mcl/execute

Ejemplos

POST /api/tenants/acme/mcl/execute

Web IDE

Browser IDE surface for Object Explorer, MCL editor tabs, script workspace, results, and assisted authoring.

Implementado

Sintaxis

GET /app

Ejemplos

GET /app

Notas

  • The first authoring assistants generate reviewable MCL for READDATA and ACTION instead of applying hidden changes.

Web authentication, sessions, and permissions

Browser product capabilities added to move the Web IDE from a prototype shell toward a real authenticated product surface.

Web auth and tenant session

Adds Web login/session foundations, tenant switching, and server-side session handling for the browser app.

Implementado

Sintaxis

GET /login
POST /login
POST /logout
GET /app

Ejemplos

GET /app

Notas

  • The Web surface uses authenticated server-side context instead of exposing operational tokens to the browser.

OIDC model and server-side sessions

Defines the SaaS identity direction and hardens session handling for future OIDC providers.

Implementado

Sintaxis

OIDC sign-in model
Server-side session state
Tenant-aware app context

Ejemplos

OIDC sign-in model

Permissions by action

Applies permission checks by operation/action across Web API calls and product screens.

Implementado

Sintaxis

Read catalog objects
Execute MCL
Run scripts
View diagnostics

Ejemplos

Read catalog objects

Web authoring and operations

Operational browser workflows added after the first Web IDE: real catalog navigation, script execution, results, diagnostics, graph views, and visual authoring.

Real catalog Object Explorer

Object Explorer reads the real tenant/environment catalog instead of a placeholder tree.

Implementado

Sintaxis

Browse schemas
Browse CONNECTION, READDATA, WRITEDATA, TRANSFORMATION, DATAFLOW, ACTION, TASK, FLOW

Ejemplos

Browse public schema objects

Script execution workflow

Runs server-side MCL scripts from the Web IDE and returns structured output to result views.

Implementado

Sintaxis

Open script
Execute script
Inspect result tab

Ejemplos

Execute setup-dev.mcl from the Web IDE

Results, runs, and diagnostics

Shows command results, run history, logs, diagnostics, and controlled server error details in the Web UI.

Implementado

Sintaxis

Result grid
JSON result
Run logs
Server error viewer

Ejemplos

Open run diagnostics after EXECUTE FLOW

Visual authoring and graph viewers

Adds minimum visual authoring and graph inspection for integration objects and FLOW/DATAFLOW structures.

Implementado

Sintaxis

Visual authoring
FLOW graph viewer
DATAFLOW graph viewer
Object properties authoring

Ejemplos

Inspect DATAFLOW graph

Script workspace and managed storage

Server-side file capabilities used by the Web IDE and planned human PostgreSQL authoring workflow.

Script workspace storage provider

Stores scripts and supporting files server-side so Web authoring does not depend on local machine paths.

Implementado

Sintaxis

metoriq://scripts/...
.mcl
.sql
.json

Ejemplos

metoriq://scripts/dev/load-dimensions.mcl

Script Explorer and file picker

Lets users browse, open, select, and reference managed workspace files from Web authoring flows.

Implementado

Sintaxis

Browse scripts
Pick SQL file
Pick JSON properties file

Ejemplos

Pick metoriq://scripts/sql/dim_brand.sql

Governance and sharing

Adds controlled organization and sharing concepts for managed script workspace files.

Implementado

Sintaxis

Managed workspace files
Shared script references
Governed server-side paths

Ejemplos

Reference a shared SQL file from authoring

Managed Storage Explorer

Provides a Web surface for inspecting managed storage used by scripts and product workflows.

Implementado

Sintaxis

Open managed storage
Inspect folders
Inspect files

Ejemplos

Open managed storage explorer

Packaging and environment dashboard

Product hardening milestones around local HML deployment and environment readiness visibility.

Local HML Docker packaging

Packages the product for local homologation-style runs and automates update flows.

Implementado

Sintaxis

docker compose up
HML update automation

Ejemplos

Run local HML package

Environment dashboard workspace card

Shows whether the active environment has a workspace profile configured and ready.

Implementado

Sintaxis

Workspace status
Provider
Database
Host and port
Next action hint

Ejemplos

Open environment dashboard

Notas

  • The card does not expose passwords or connection strings with secrets.

Future runtime controls

Commands recorded as product direction for scheduler, retries, cancellation, and distributed runtime milestones.

PostgreSQL human authoring review

Milestone 070 will validate a full human PostgreSQL authoring workflow across MCL, Web IDE, Script Workspace, and server-side files.

Planificado

Sintaxis

CONNECTION
READDATA
WRITEDATA
ACTION
TRANSFORMATION
DATAFLOW
TASK
FLOW
metoriq://scripts/...

Ejemplos

Build a PostgreSQL integration from Web IDE and managed scripts

Scheduler / retries / distributed execution

Future operational controls beyond the current runtime foundation.

Planificado

Sintaxis

SCHEDULE FLOW KEY <flowKey> ...;
RETRY RUN KEY <run_id>;
CANCEL RUN KEY <run_id>;

Ejemplos

RETRY RUN KEY "<run_id>";