Node/Edge Attributes Queries

Asked by David E Monarchi

Hello -

Apologies in advance if this has been asked and answered. I can't find it.

I am using a database as the source of data for my graph with four queries, shown below.
Node query:
SELECT domain_name_dom as ID, fast_score_dom as force,class_dom as vertical FROM gephi.CJ_EXAMPLE_DOMAIN1_DOM;
Edge query:
SELECT ID, concat(from_domain_dda,"->",to_domain_dda) as label, from_domain_dda as source, to_domain_dda as target, nlinks_dda as weight from gephi.cj_example_d2drollup_alx_dda;
Node attributes query:
SELECT domain_name_apr as id, outgoinglinkscount_apr as outgoinglinkscount, incominglinkscount_apr as incominglinkscount FROM gephi.CJ_EXAMPLE_ALX_PPL_ROLLUP_APR;
Edge attributes query:
select ID, date_lastlink_dda as date_lastlink, latcount_dda as latcount from gephi.cj_example_d2drollup_alx_dda;

The queries appear to execute without errors, but the attributes defined the 3rd and 4th queries are not in the data table nor are they available in, for example, the ranking drop-down. (The two attributes defined in the node query don't appear either, but they were an experiment. I didn't really expect them to show up based on the description at the top of the Edge List Database window.)

The attributes are all strings or integers.

Am I looking for them in the wrong place, or have I not done this correctly?

As usual, thanks for your kind assistance.

Best,
David

Question information

Language:
English Edit question
Status:
Solved
For:
Gephi Edit question
Assignee:
No assignee Edit question
Solved by:
David E Monarchi
Solved:
Last query:
Last reply:
Revision history for this message
Mathieu Bastian (mathieu.bastian) said :
#1

Hi, could you please try include the attributes in the first and second queries ? Normally it doesn't make a difference, so it's worthed to try.

Revision history for this message
David E Monarchi (david-e-monarchi) said :
#2

Hi Mathieu -

Thanks for the suggestion. I rewrote the queries as follows

Node query:
SELECT domain_name_dom as ID, fast_score_dom as force,class_dom as vertical, outgoinglinkscount_apr as outgoinglinkscount, incominglinkscount_apr as incominglinkscount FROM gephi.CJ_EXAMPLE_DOMAIN1_DOM join gephi.CJ_EXAMPLE_ALX_PPL_ROLLUP_APR on domain_name_dom = domain_name_apr ;

Edge query:
SELECT ID, concat(from_domain_dda,"->",to_domain_dda) as label, from_domain_dda as source, to_domain_dda as target, nlinks_dda as weight, date_lastlink_dda as date_lastlink, latcount_dda as latcount from gephi.cj_example_d2drollup_alx_dda;

The attributes for the node (force, vertical, outgoinglinkscount, and incominglinkscount) are still not available. The attributes for the edge (date_lastlink and latcount) are there, although I don't know how to use the date_lastlink as a date. One thought I had was to convert it using a CAST.

Please let me know if you have any suggestions. Thanks.

Best,
David

Revision history for this message
David E Monarchi (david-e-monarchi) said :
#3

I believe I've solved the problem, Mathieu. Although the nodes were being created, there was an "error" in the query because MySQL didn't allow force as an alias for the field. After I changed "fast_score_dom as force" to "fast_score_dom as Xforce", the problem seemed to disappear. And as a "magical" side effect, the date field is now functioning correctly too.

Thanks again for your assistance and patience.

Best,
David