Mapeamento de JSON para tabela no Jitterbit App Builder
Visão geral
Os dados no App Builder são modelados usando tabelas relacionais. A maioria das APIs REST usa JSON para se comunicar. Para processar os dados JSON no App Builder, uma transformação deve ocorrer para mapear os dados JSON para tabelas relacionais. Esse mapeamento ocorre da seguinte forma:
- Objetos JSON e seus objetos filhos aninhados são compactados em uma única tabela.
- Matrizes JSON criam novas tabelas.
Exemplos
Objeto simples
JSON
{
"name": "Thomas Magnum",
"occupation": "Private Eye"
}
Tabela Relacional
Tabela "endpoint"
nome | ocupação |
---|---|
Thomas Magnum | Detetive particular |
Objeto aninhado
JSON
{
"name": "Thomas Magnum",
"occupation": "Private Eye",
"bestCar": {
"model": "Ferrari 308 GTS",
"year": "1978"
}
}
Tabela Relacional
Tabela "endpoint"
nome | ocupação | melhorCarro/modelo | melhorCarro/ano |
---|---|---|---|
Thomas Magnum | Detetive particular | Ferrari 308 GTS | 1978 |
Matrizes
JSON
{
"name": "Thomas Magnum",
"occupation": "Private Eye",
"ferraris": [
{ "model": "308 GTS", "year": "1978" },
{ "model": "308 GTSi", "year": "1980" },
{ "model": "308 GTSi Quattrovalvole", "year": "1984" },
]
}
Tabelas relacionais
Tabela "endpoint"
nome | ocupação |
---|---|
Thomas Magnum | Detetive particular |
Tabela "endpoint/ferraris"
modelo | ano |
---|---|
308 GTS | 1978 |
308 GTSi | 1980 |
308 GTSi Quattrovalvole | 1984 |