地图
根据表达式将记录映射到新输出
根据表达式将记录映射到新输出
性能
名字 | 类型 | 描述 | 必填 |
---|---|---|---|
表达 | object ,string |
表达 |
是的 |
语言 | string |
语言 枚举: "jmespath" ,"sql" |
是的 |
其他属性:不允许
例
source:
server_name: redislabs
schema: dbo
table: emp
transform:
- uses: map
with:
expression:
first_name: first_name
last_name: last_name
greeting: >-
'Hello ' || CASE WHEN gender = 'F' THEN 'Ms.' WHEN gender = 'M' THEN 'Mr.'
ELSE 'N/A' END || ' ' || full_name
country: country
full_name: full_name
language: sql
Example
source:
table: customer
transform:
- uses: map
with:
expression: |
{
"CustomerId": customer_id,
"FirstName": first_name,
"LastName": last_name,
"Company": company,
"Location":
{
"Street": address,
"City": city,
"State": state,
"Country": country,
"PostalCode": postal_code
},
"Phone": phone,
"Fax": fax,
"Email": email
}
language: jmespath
expression: object
Expression
No properties.
On this page