GroveStreams

Import data from and old component to a new component507

pat private msg quote post Address this user
HI,


I am using an http PUT of a json file to push my data on GS

 
{"feed": {
    "component": [{
        "componentId": "Id0099",
        "stream": [
            {
                "data": [198],
                "streamId": "rx"
            },
            {
                "data": [70],
                "streamId": "tx"
            }
        ]
    }],
    "time": [1548795712000]
}}
 


I have a one year history of data for componentId : Id0099

Imagine the componentId : Id0099 is dead and I want to replace it with a new componentID ID0100
I cannot change the componentId before the PUT, so the new componentID is ID0100

What is the best (fastest/easiest) way to keep all the data from the previous componentID (Id0099) to be associated with the new componentID ID0100 ?
I mean, I have a new componentID ID0100 created with new values but I should find all the previous data that was stored in the componentID ID0099.

Thank you for your help
Post 1 IP   flag post
MikeMills private msg quote post Address this user
I'm not sure I'm following you, but I'll throw a couple of things out there.

1) You could have just edited the component and changed its ID and data from the new PUTs would've flowed into the same component/stream.

2) You can export data from the "old id" stream and then import it into the "new id" component stream:
* Export: Admin-export-stream data (select the old stream)
* Change the component ID in the export file to the new component ID (the file is located in Browser's download directory)
* Import: Admin-import-stream data. Create a file bucket and upload the file into it. Create an import profile, select your file bucket, and choose gs.importGsStreams
Post 2 IP   flag post
pat private msg quote post Address this user
HI,

Yes sorry for that question. It was because I had a component_template filled in one case and not in the other case. So it was creating a new component instead of feeding the previous one.

-> Method 1 is the good one !

Thanks
Post 3 IP   flag post
3006 3 3
Log in or sign up to compose a reply.