metadata-ingestion/docs/sources/sql-queries/sql-queries_post.md
Use the Important Capabilities table above as the source of truth for supported features and whether additional configuration is required.
{"query": "SELECT x FROM my_table", "timestamp": 1689232738.051, "user": "user_a", "downstream_tables": [], "upstream_tables": ["my_database.my_schema.my_table"]}
{"query": "INSERT INTO my_table VALUES (1, 'a')", "timestamp": 1689232737.669, "user": "user_b", "downstream_tables": ["my_database.my_schema.my_table"], "upstream_tables": []}
Note: This uses newline-delimited JSON format (NDJSON), where each line is a separate JSON object.
The source expects newline-delimited JSON (NDJSON), with one query object per line. Common fields:
query (required): SQL text to parsetimestamp (optional): query execution timestampuser (optional): actor used for usage attributionoperation_type (optional): fallback operation classificationsession_id (optional): session key used to resolve temporary tables across related queriesdownstream_tables / upstream_tables (optional): fallback lineage hints if parsing failsWhen stateful ingestion is enabled, lineage extraction can progress incrementally over new query records while preserving historical checkpoints.
session_id enables correlation of temporary-table creation and downstream usage across query sequences, improving lineage continuity.
Module behavior is constrained by source APIs, permissions, and metadata exposed by the platform. Refer to capability notes for unsupported or conditional features.
If ingestion fails, validate credentials, permissions, connectivity, and scope filters first. Then review ingestion logs for source-specific errors and adjust configuration accordingly.