I am trying to load ignite using the data streamer into an ignite table. The
streamer works but when querying the table it is empty. Upon further
investigation it looks like the streamer is creating a key\value store in
the same cache that the table resided. When querying the metadata it shows
no changes to the cache. If i query the cache parsing in the surrogate key i
injected into the code using the rest service i can see the records are
there but in what looks like a key\value store. Can the IgniteDataStreamer 
load a table?

here is the .net code

   try { connection.Open();
                command = new SqlCommand(sql, connection);
                dataReader = command.ExecuteReader();
                using (var ldr = ignite.GetDataStreamer<int,
IndexHistory>("IndexcompositionCache"))
                {
                    ldr.PerNodeBufferSize = 1024;
                    int i = 1;
                    while (dataReader.Read())
                    {
                        var o = new IndexHistory()
                        {
                            VD = (int)dataReader.GetValue(0),
                            SHARESININDEX = (double)dataReader.GetValue(1),
                            NAME = (string)dataReader.GetValue(2),
                            ISIN = (string)dataReader.GetValue(3),
                            SEDOL = (string)dataReader.GetValue(4),
                            RIC = (string)dataReader.GetValue(5),
                            CLOSE = (double)dataReader.GetValue(6),
                            RATE = (decimal)dataReader.GetValue(7)
                        };
                        ldr.AddData(i, o );

                        i = i + 1;
                    }
                    
                }
                dataReader.Close();
                command.Dispose();
                connection.Close(); }
            catch (Exception ex)
            { 
                Console.WriteLine(ex.Message.ToString());
            }



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Reply via email to