• Jone Qiang

    Jone Qiang

    3 weeks ago
    https://github.com/questdb/questdb/issues/2483 ILP insert frequently, server crashed.version 6.5.1
    Jone Qiang
    Pei
    3 replies
    Copy to Clipboard
  • Jone Qiang

    Jone Qiang

    4 weeks ago
    what's reason for this issue: io.questdb.cutlass.line.LineSenderException: [111] could not connect to host [host=localhost] at io.questdb.cutlass.line.tcp.PlainTcpLineChannel.<init>(PlainTcpLineChannel.java:75) ~[questdb-6.4.3-jdk8.jar:6.4.3-jdk8]
    Jone Qiang
    Andrey Pechkurov
    65 replies
    Copy to Clipboard
  • k

    Kevin

    3 weeks ago
    Is there a way to get the latest (edge/nightly) release of questdb. I need a version with this commit: https://github.com/questdb/questdb/pull/2490 Unfortunately without it questdb can't initialize properly on freebsd.
  • Nicolas Hourcard

    Nicolas Hourcard

    2 weeks ago
    hey Kevin, we should be releasing the next version tomorrow
  • s

    Shriram Sunder

    1 month ago
    Hey team, just a quick question for whoever is awake, I'm trying to push some data into a table (that's not been created yet, let's call it 'aggs' for aggregate data). As I'm inserting this data, I'm getting the following error:
    panic: table name already provided: invalid message
    This is the code that does the insertion... am I doing anything wrong? It works exactly as expected when I used the exact same code for another table to insert all the tickers info.
    sender, _ := QDBConnectILP(ctx)
    	defer sender.Close()
       
        // For each of these results, push!
    	for _, agg := range aggBar.Results {
    		err := sender.Table("aggs").
    			Symbol("ticker", aggBar.Ticker).
    			StringColumn("timespan", timespan).
    			Int64Column("multiplier", int64(multiplier)).
    			Float64Column("timestamp", agg.T).
    			Float64Column("open", agg.O).
    			Float64Column("high", agg.H).
    			Float64Column("low", agg.L).
    			Float64Column("close", agg.C).
    			Float64Column("volume", agg.V).
    			Float64Column("vw", agg.Vw).
    			Float64Column("n", float64(agg.N)).
    			At(ctx, time.Now().UnixNano())
    		CheckErr(err)
    	}
    
    	// Make sure that the messages are sent over the network.
    	err = sender.Flush(ctx)
    	CheckErr(err)
    s
    Bolek Ziobrowski
    +1
    7 replies
    Copy to Clipboard
  • s

    Shriram Sunder

    2 weeks ago
    I've also encountered another weird issue, I don't know if this is standard in SQL (I've been working with Postgres for the past 8 years and I've not encountered this). I'm open to all criticism. I've got a table full of aggregates called 'aggs', and I've got a table full of urls called 'urls' that are used to pull down the aggregates from a data provider. I use a small program to check which urls from 'urls' have not been used to populate 'aggs' yet, and then use them to fill up 'aggs'. But I need a query to determine which urls are "done", by checking 'aggs', as a sanity check. So I just update the table 'urls', based on what's in aggregates using the following query, or so I thought. 1. The below query does not work, it throws a
    Invalid column: q.timestamp
    error ONLY when I include both the conditions.
    WITH q AS (
      SELECT ticker, timestamp
      FROM aggs 
      LATEST ON timestamp 
      PARTITION BY ticker
    )
    UPDATE urls u
    SET done = true
    FROM q
    WHERE q.timestamp <= u.end
    AND q.ticker = u.ticker;
    2. This query below works however.
    WITH q AS (
      SELECT ticker, timestamp
      FROM aggs 
      LATEST ON timestamp 
      PARTITION BY ticker
    )
    UPDATE urls u
    SET done = true
    FROM q
    WHERE q.timestamp <= u.end;
    --AND q.ticker = u.ticker;
    3. And this query works.
    WITH q AS (
      SELECT ticker, timestamp
      FROM aggs 
      LATEST ON timestamp 
      PARTITION BY ticker
    )
    UPDATE urls u
    SET done = true
    FROM q
    WHERE q.ticker = u.ticker;
    What's the issue with the first statement ? Obviously, I don't need just one condition, I need both of them. The schema for 'aggs' is as follows:
    CREATE TABLE 'aggs' (
      ticker SYMBOL capacity 256 CACHE,
      timespan STRING,
      multiplier LONG,
      open DOUBLE,
      high DOUBLE,
      low DOUBLE,
      close DOUBLE,
      volume DOUBLE,
      vw DOUBLE,
      n DOUBLE,
      timestamp TIMESTAMP
    ) timestamp (timestamp) PARTITION BY DAY;
    The schema for 'urls' is as follows:
    CREATE TABLE 'urls' (ticker SYMBOL capacity 256 CACHE, start TIMESTAMP,end TIMESTAMP,
    url STRING,
    done BOOLEAN
    ) timestamp (end) PARTITION BY DAY;
    I think it's related to this issue: https://github.com/questdb/questdb/issues/2329
  • j

    javier ramirez

    2 weeks ago
    Hi Shriram. It looks like an error indeed, and maybe you want to add your comments to the github issue you referenced (or start a new one). In the meantime, maybe you can do a workaround
  • j

    javier ramirez

    2 weeks ago
    Since it works with a single condition, you could do the join with your conditions before, then update using a single column. Something like this
    WITH q AS (
      SELECT ticker, timestamp
      FROM aggs 
      LATEST ON timestamp 
      PARTITION BY ticker
    ), q_url AS (
      select q.* from q join urls on(ticker)
      WHERE `timestamp` <= end
    )
    UPDATE urls u
    SET done = true
    FROM q_url
    where u.ticker = q_url.ticker;
  • s

    Shriram Sunder

    2 weeks ago
    Hi Javier, I've already commented on the specific issue, I don't want to open another (would be a duplicate). And thank you for your clever workaround!