Referência

Help de comandos MCL

Referência estática compacta para o CLI externo, a superfície MCL atual, APIs HTTP e capacidades da IDE Web até o Milestone 069, com o Milestone 070 planejado.

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

Sintaxe

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

Exemplos

Metoriq.Cli --help

setup init / status

Initializes the metadata database or reports setup state.

Implementado

Sintaxe

Metoriq.Cli setup init
Metoriq.Cli setup status

Exemplos

Metoriq.Cli setup status

tenant administration

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

Implementado

Sintaxe

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>

Exemplos

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

Sintaxe

Metoriq.Cli tenants provision-file <path>

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

HELP;
HELP <TOPIC>;

Exemplos

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

Sintaxe

USE ENVIRONMENT KEY <environmentKey>;

Exemplos

USE ENVIRONMENT KEY dev;

LEAVE ENVIRONMENT

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

Implementado

Sintaxe

LEAVE ENVIRONMENT;

Exemplos

LEAVE ENVIRONMENT;

CLEAR / EXIT / QUIT

Clears the interactive terminal or leaves the prompt.

Implementado

Sintaxe

CLEAR;
EXIT;
QUIT;

Exemplos

CLEAR;
EXIT;

Environment

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

CREATE / ALTER / COPY ENVIRONMENT

Creates, patches, or copies environments.

Implementado

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

SHOW ENVIRONMENTS;

GENERATE ENVIRONMENT

Generates MCL commands from the current environment state.

Implementado

Sintaxe

GENERATE <ACTION> ENVIRONMENT KEY <key>;

Exemplos

GENERATE ALTER ENVIRONMENT KEY dev;

ENABLE / DISABLE / DELETE ENVIRONMENT

Changes environment status or removes a disabled environment.

Implementado

Sintaxe

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

Exemplos

DISABLE ENVIRONMENT KEY dev;

DEPENDENTS ENVIRONMENT

Lists direct objects that depend on the environment.

Implementado

Sintaxe

DEPENDENTS ENVIRONMENT KEY <key>;

Exemplos

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

Sintaxe

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

Exemplos

SHOW SCHEMA KEY public OBJECTS;

CREATE / ALTER / DELETE SCHEMA

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

Implementado

Sintaxe

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

Exemplos

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

Sintaxe

SHOW CONNECTOR TYPES;

Exemplos

SHOW CONNECTOR TYPES;

DETAIL CONNECTOR TYPE

Shows capabilities and connection properties schema for a connector type.

Implementado

Sintaxe

DETAIL CONNECTOR TYPE KEY <typeKey>;

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

DETAIL CONNECTION KEY public.source_db;

GENERATE CONNECTION

Generates sanitized MCL commands for a connection without exposing secrets.

Implementado

Sintaxe

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>;

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

SHOW WORKSPACE PROFILE;

TEST WORKSPACE PROFILE

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

Implementado

Sintaxe

TEST WORKSPACE PROFILE;

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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>";

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

EXECUTE READDATA KEY <schemaKey>.<readDataKey>;

Exemplos

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

Sintaxe

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>;

Exemplos

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

Sintaxe

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>";

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

CHECK WRITEDATA KEY <schemaKey>.<writeDataKey>;

Exemplos

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

Sintaxe

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

Exemplos

GENERATE CREATE WRITEDATA KEY public.write_dim_brand;

EXECUTE WRITEDATA

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

Implementado

Sintaxe

EXECUTE WRITEDATA KEY <schemaKey>.<writeDataKey>;

Exemplos

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

Sintaxe

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>";

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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>;

Exemplos

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

Sintaxe

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>";

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

CHECK DATAFLOW KEY <schemaKey>.<dataflowKey>;

Exemplos

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

Sintaxe

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

Exemplos

GENERATE CHECK DATAFLOW KEY public.load_dimensions;

EXECUTE DATAFLOW

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

Implementado

Sintaxe

EXECUTE DATAFLOW KEY <schemaKey>.<dataflowKey>;

Exemplos

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

Sintaxe

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>;

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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>;

Exemplos

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

Sintaxe

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>";

Exemplos

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

SHOW TENANT LICENSE

Shows tenant license metadata from MCL.

Implementado

Sintaxe

SHOW TENANT LICENSE;

Exemplos

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

Sintaxe

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>";

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

SHOW ENVIRONMENT USAGE;

License enforcement

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

Implementado

Sintaxe

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

Exemplos

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

Sintaxe

SHOW RUNS;

Exemplos

SHOW RUNS;

SHOW RUN KEY

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

Implementado

Sintaxe

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;

Exemplos

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

Sintaxe

SHOW RUN LOG RETENTION POLICY;

Exemplos

SHOW RUN LOG RETENTION POLICY;

PURGE RUN LOGS

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

Implementado

Sintaxe

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>";

Exemplos

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

Sintaxe

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>";

Exemplos

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

Sintaxe

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

Exemplos

DETAIL ACTION KEY public.insert_product_test;

GENERATE ACTION

Generates MCL commands from the current ACTION object.

Implementado

Sintaxe

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

Exemplos

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

Sintaxe

EXECUTE ACTION KEY <schemaKey>.<actionKey>;

Exemplos

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

Sintaxe

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>`;

Exemplos

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

Sintaxe

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

Exemplos

SHOW TASKS;

GENERATE TASK

Generates MCL commands from the current TASK object.

Implementado

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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>;

Exemplos

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

Sintaxe

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

Exemplos

SHOW FLOW KEY public.daily_load TASKS;

CHECK FLOW

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

Implementado

Sintaxe

CHECK FLOW KEY <schemaKey>.<flowKey>;

Exemplos

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

Sintaxe

EXECUTE FLOW KEY <schemaKey>.<flowKey>;

Exemplos

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

Sintaxe

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>`;

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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;

Exemplos

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

Sintaxe

VERSION;

Exemplos

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

Sintaxe

HELP VERSION;

Exemplos

HELP VERSION;

Localized MCL messages

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

Implementado

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

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

MCL execution API

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

Implementado

Sintaxe

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

Exemplos

POST /api/tenants/acme/mcl/execute

Web IDE

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

Implementado

Sintaxe

GET /app

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

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

Exemplos

OIDC sign-in model

Permissions by action

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

Implementado

Sintaxe

Read catalog objects
Execute MCL
Run scripts
View diagnostics

Exemplos

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

Sintaxe

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

Exemplos

Browse public schema objects

Script execution workflow

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

Implementado

Sintaxe

Open script
Execute script
Inspect result tab

Exemplos

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

Sintaxe

Result grid
JSON result
Run logs
Server error viewer

Exemplos

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

Sintaxe

Visual authoring
FLOW graph viewer
DATAFLOW graph viewer
Object properties authoring

Exemplos

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

Sintaxe

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

Exemplos

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

Sintaxe

Browse scripts
Pick SQL file
Pick JSON properties file

Exemplos

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

Governance and sharing

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

Implementado

Sintaxe

Managed workspace files
Shared script references
Governed server-side paths

Exemplos

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

Sintaxe

Open managed storage
Inspect folders
Inspect files

Exemplos

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

Sintaxe

docker compose up
HML update automation

Exemplos

Run local HML package

Environment dashboard workspace card

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

Implementado

Sintaxe

Workspace status
Provider
Database
Host and port
Next action hint

Exemplos

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.

Planejado

Sintaxe

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

Exemplos

Build a PostgreSQL integration from Web IDE and managed scripts

Scheduler / retries / distributed execution

Future operational controls beyond the current runtime foundation.

Planejado

Sintaxe

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

Exemplos

RETRY RUN KEY "<run_id>";