Database Expression

A database expression is used in Persistence Mappings to define the location of data in a database.

Table Expression

Specification

{
  "schemaName": "<string>",
  "tableName": "<string>"
}

Structure Values

Field Name

Type

Description

Required

Default

schemaName

String

The name of the schema in the database in which the table resides.

Optional


tableName

String

The name of the table.

Required


Example

{
  "schemaName": "dbo",
  "tableName": "transactions"
}



Query Expression

Specification

{
  "query": "<string>"
}

Structure Values

Field Name

Type

Description

Required

Default

query

String

The SQL query to execute on the database before returning data to Magpie. The query dialect should match the dialect of the database.

Required


Example

{
  "query": "select * from dbo.transactions where department_id = 4"
}


Was this article helpful?
0 out of 0 found this helpful