Bartosz
09/12/2022, 6:56 AMfor await ( let item of items )
{
const [[, prevValue],, [, data]] = item;
const [devid, address, value, timestamp, table] = data.split('|');
if( prevValue !== value ) {
sender
.table(config.questdb.tables[table])
.symbol("devid", devid)
.symbol("address", address)
.intColumn("value", valueFunction.set[table](value))
.booleanColumn("isFloat", table === 'float')
.timestampColumn("created_at", timestamp * 1e3);
await sender.flush();
counterCreated++;
}
}
Error: Table name has already been set
// add rows to the buffer of the sender
sender.table("prices").symbol("instrument", "EURUSD")
.floatColumn("bid", 1.0195).floatColumn("ask", 1.0221).atNow();
sender.table("prices").symbol("instrument", "GBPUSD")
.floatColumn("bid", 1.2076).floatColumn("ask", 1.2082).atNow();
Andrey Pechkurov
09/12/2022, 7:07 AMat()
instead of timestampColumn()
at()
or atNow()
at()
call should be in nanosecondsBartosz
09/12/2022, 7:18 AMAndrey Pechkurov
09/12/2022, 7:29 AMatNow()
call after .timestampColumn("created_at", timestamp * 1e3)
. The client needs to know when to start a new line (row) and without this call it won't do thatBartosz
09/12/2022, 9:06 AMError: This socket has been ended by the other party
at Socket.writeAfterFIN [as write]
Andrey Pechkurov
09/12/2022, 9:08 AMBartosz
09/12/2022, 9:08 AMAndrey Pechkurov
09/12/2022, 9:08 AMBartosz
09/12/2022, 9:10 AMAndrey Pechkurov
09/12/2022, 9:14 AMBartosz
09/12/2022, 9:26 AMError: Table name has already been set
Andrey Pechkurov
09/12/2022, 10:53 AMBartosz
09/12/2022, 11:04 AMAndrey Pechkurov
09/12/2022, 11:21 AM