Missing Chainquery Data

@Beamer #ChainQuery isn’t returning tags or the website in a claim search, such as this one.
To get the tags, I have to run a separate lookup, but I don’t know of any lookups to find the website.

Is there a reason why all this data isn’t in one result like it is with LBRYnet, and is there a way to return the website_url, without it being null?

On the new version of LBRYnomics, I want to try and pull in extra data for each channel onClick. Having a single lookup, that can return all this data, would be super useful.

Chainquery is parser of the blockchain and puts the data into table format. For example, there is a row in the claim table for each claim. Each claim has a relationship to many claim tags. tags are another table.

The SDK is an API client that gathers this data and creates a normalized response.

If the question is why are the tags not in a column on the claim table. It was done that way so inner join queries could be created rather than search a string or parse json in a json column.

Ultimately it’s all just SQL to get the data you want by query:

SELECT GROUP_CONCAT(tag.tag), claim.* 
FROM chainquery.claim 
INNER JOIN claim_tag ON claim_tag.claim_id = claim.claim_id
INNER JOIN tag ON tag.id = claim_tag.tag_id
WHERE claim.claim_id = "7e8ea9f3a879041c516a1d7e6f3d95d7235377e6"
GROUP BY claim.claim_id;

This would be an example query to get the data you want. This could be pass to the Chainquery SQL API.

Awesome, thanks.
What was the reason for the website_url being returned as null. Is there a way around that, or is that data not accessible?

I don’t recall, would have to look at the code to see if its being set. Not sure about this particular claim if one exists. I assume you know it does and are wondering why its not. If so then, I would need to check why it’s not being set currently. I have tried to create columns for every piece of data, but not all of it is being set.

Part of the data I’m trying to extract for the new LBRYnomics site, is the channel’s registered website_url.

When someone clicks a channel name, a popup card is created containing additional information for that channel, including their website_url, as seen in the below image.

However, the website returns null with ChainQuery, but it is present in the LBRYnet results.

LBRYnet Results:


Ok, I checked the code base, we are not setting that field. The column is in the database, but likely it was removed due to abuse at some point. Sometimes people have used these unlimited fields in the metadata to try to breaking CQ (sometimes people have nothing better to do with their time). We have some other important fields they were attempting to break before where we have had to add in a bunch of check and limits. I think we could copy these checks and use them for website url.

1 Like

I’ll remove the website_url for now, then if you reintroduce it with the checks, I’ll add it then.

Thanks for your time Mark, much appreciated :slight_smile: