PEPPERI NOTIFICATION SERVICE
PFS - Pepperi File Service
Actions Queue
CPI Node
TODO training
File Import
Import data to ADAL using a URI
post
https://api.pepperi.com
/v1.0/addons/data/import/file/{addonUUID}/{table}
Import URI

Overwrite

When uploading an object to the database using a "put" action, it will overwrite an existing object with the same key. Because of this, before uploading the object this function first checks if the object already exists in the database, and if so merges them together (overwriting only modified attributes) and only then uploads them.
This happens by default. If an addon wishes to import objects while completely overwriting any existing object in the database (i.e. bypass the merging process) it may also pass "Overwrite"=true in the body parameter.
Using this interface is only possible with tables that support Import/Export. In order to support Import/Export, please refer to the Import and export relations.

Input:

1
{
2
'URI': 'dataURI.ext',
3
'Overwrite': false //false by default
4
'Delimiter': ';' //default is the distributor's default delimiter
5
}
Copied!
Takes a URI describing a data source as an input. The input data can be either in JSON format or CSV format.
JSON format: The input data should be in the form of an array, where each element is an object
CSV format: Each line represents a JSON object. Each column represents a property. Nested properties will be separated by a '/' character. For example:
Attr1
Attr2
Attr3/Nested1
Attr3/Nested2
1
'a'
'hello'
'same'
2
'b'
'this is'
'goes'
3
'c'
'nested'
'here'
Represents the following JSON array:
1
[
2
{
3
"Attr1":1,
4
"Attr2":'a',
5
"Attr3":{
6
"Nested1":'hello',
7
"Nested2":'same'
8
}
9
},
10
{
11
"Attr1":2,
12
"Attr2":'b',
13
"Attr3":{
14
"Nested1":'this is',
15
"Nested2":'goes'
16
}
17
},
18
{
19
"Attr1":3,
20
"Attr2":'c',
21
"Attr3":{
22
"Nested1":'nested',
23
"Nested2":'here'
24
}
25
}
26
]
Copied!
For a simple JSON -> CSV converter and for better understanding, please visit this link.
Currently only URL type URI is supported
Importing using the JSON format is limited to 9,500 items, and 100MB.
Importing using the CSV format is limited to 95,000 items, and 1GB.
Anything greater that that will have to be divided into parts, and imported separately.
Uses calls to Data Import to process the entire file.
The format of the data should be the same as the output given by File Export.

Output:

Outputs a URL to a temp file containing the result, which is an array of ImportedObjects merged from all calls made to Data Import.
Last modified 1mo ago
Copy link