Skip to content

Data import from other sorces #484

Answered by c0c0n3
SBlechmann asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @SBlechmann !

loop through the data and then post it to the notify endpoint.. but that doesn't seem very elegant.

Maybe but it'll do :-) Well unless you have lots of data...

We don't have an import Web API at the moment, but one thing you could try if you need/want/prefer using the notify endpoint for importing lots of data is to split your entity data into batches and then call the notify endpoint with each batch payload. E.g.

origin DB   --- stream data --->  your script to convert rows to NGSI entities 
    ---- [ batch1 = [e1, e2, .., e[k]], batch2 = [e[k+1], e[k+2], ...] ]---> 
map to notify payload --- [ {data: batch1}, {data: batch2}, ...] --->
map call notify ---> QuantumLeap…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chicco785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants