Since mindsphere is already installed and data is being already stored in cloud. We want to use this data instead of PLC.
Mindsphere has its own nodes for node red.
One way could be using Node-Red to obtain the data with an HTTPS request by using the Node-Red HTTP Request Node.
I believe Mindsphere has an API and documentation on how to access data externally so check this on the Siemens Mindsphere web site on the exact security requirements. If configured correctly the HTTP Request Node will likely to be able to handle this.
Once you have the connection and data flowing into node-red (e.g. in JSON format) you can then set up flows to format the data for writing to the database of your choice. (e.g. influxDB, or SQL etc). This may involve Function nodes, Change nodes etc. etc. etc. it really depends on how the data arrives.
If you use the influxDB time series database there are nodes available that you can add to your Node-Red palette that will do the writing of the data for you very easily.
There are plenty of examples of how to do this in the help section and forum of Node-Red.