Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v73
  • v74
  • v73
  • v72
Login
  • Getting Started
  • Administrator documentation
  • Functional characteristics
  • Technology description
  • System requirements
  • Admin Panel
  • Platform installation
  • Platform configuration
  • Platform maintenance
  • Custom channels guide
    • Overview
    • Creating and configuring a channel
    • Entity field configuration
    • Template language
    • Entities
    • Pipes
      • Pipe: Basic Concepts
      • Result
      • Errors
      • Log
      • Pack
      • Unpack
      • HTTP Request
      • Store Set
      • Store Get
      • Selector
      • SQL
      • Eventer
      • Scheduler
    • Pipelines
  • Extra
  • Processing HTTP/HTTPS traffic
  • Administrator API
This is documentation for Altcraft Platform v73. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Custom channels guide
  • Pipes
  • SQL
Documentation for version v73

SQL

Description​

The SQL pipe executes an SQL query to the database and puts the result as an object or an array of objects in $in.sql_query.

Peculiarities:

  • If none of the conditions from *params.outs are met, the event will go to outs.success (if one is specified)

Structure​

FieldType of valueExampleRequiredDescription
idnumber10yesPipe's ID
typestring"sql_pipe"yesType of a pipe
paramsSQLParamsObject
noType-specific parameters
outsOutsObject
noPipe's outputs

SQLParamsObject
FiTypeExampleReqieredDescription
connector_idnumber5yes-Connector SQL ID
mapbooltruenofalse

Flag to return the result as an object rather than an array of objects (the first line is taken)

query

string

"SELECT * FROM Test_Table"yes-SQL request
connection_timeoutnumber15noPIPE_SQL_CONNECTION_TIMEOUT

Connection timeout in seconds. Overrides PIPE_SQL_CONNECTION_TIMEOUT in the configuration file.

query_timeoutnumberо10noPIPE_SQL_QUERY_TIMEOUT

Request timeout in seconds. Overrides PIPE_SQL_QUERY_TIMEOUT in the configuration file.

Errors​

  1. Error processing template params.query.

  2. Error while executing SQL query.

Examples​

{
"id": 2,
"type": "sql_pipe",
"params": {
"connection_timeout": 10,
"query_timeout": 10,
"query": "SELECT CAST(SEGMENT_LIST_ID AS VARCHAR) AS 'id', SEGMENT_LIST_NAME AS 'name' FROM SEGMENT_LIST",
"connector_id": 2
},
"outs": {
"success": 3,
"error": 5
}
}
Last updated on Jan 12, 2026
Previous
Selector
Next
Eventer
  • Description
  • Structure
  • Errors
  • Examples
© 2015 - 2025 Altcraft, LLC. All rights reserved.