You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by "markgomer (via GitHub)" <gi...@apache.org> on 2023/08/29 15:04:38 UTC

[GitHub] [age] markgomer opened a new pull request, #1200: Update load csv functions

markgomer opened a new pull request, #1200:
URL: https://github.com/apache/age/pull/1200

   `load_labels_from_file` and `load_edges_from_file` now checks if there's already a graph and label with the provided name and creates it if there isn't. So it won't need to issue `SELECT create_graph();` and `SELECT create_vlabel();` with these functions calls.
   
   Importing csv files **before**:
   
   ```sql
   SELECT create_graph('agload');
   SELECT create_vlabel('agload','Country');
   SELECT load_labels_from_file('agload', 'Country', '/countries.csv');
   
   SELECT create_elabel('agload','has_city');
   SELECT load_edges_from_file('agload', 'has_city', 'edges.csv');
   ```
   
   Importing csv files **after** proposed changes:
   
   ```sql
   SELECT load_labels_from_file('agload_test_graph', 'Country', 'age_load/countries.csv');
   NOTICE:  graph "agload_test_graph" has been created
   NOTICE:  VLabel "Country" has been created
    load_labels_from_file 
   -----------------------
    
   (1 row)
   
   SELECT load_edges_from_file('agload_test_graph', 'has_city', 'age_load/edges.csv');
   NOTICE:  ELabel "has_city" has been created
    load_edges_from_file 
   ----------------------
    
   (1 row)
   ```
   
   These proposed changes may improve user experience by increasing automation and requiring less commands for the same task, also decreasing error chances of wrong issued commands.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] rafsun42 commented on pull request #1200: Update load csv functions

Posted by "rafsun42 (via GitHub)" <gi...@apache.org>.
rafsun42 commented on PR #1200:
URL: https://github.com/apache/age/pull/1200#issuecomment-1708999922

   Is it related to #1179 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Update load csv functions [age]

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on PR #1200:
URL: https://github.com/apache/age/pull/1200#issuecomment-1769141284

   @rafsun42 @markgomer What is the decision here?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Update load csv functions [age]

Posted by "rafsun42 (via GitHub)" <gi...@apache.org>.
rafsun42 commented on PR #1200:
URL: https://github.com/apache/age/pull/1200#issuecomment-1771310620

   @jrgemignani @markgomer Since graphs are schemas and Postgres does not auto create schemas, maybe we should not auto create graphs. But, I am down for auto creating the labels (#1179). Regular cypher queries auto create labels -if does not exist- anyways. 
   
   But, this PR can be reopened if you guys have different opinion. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Update load csv functions [age]

Posted by "rafsun42 (via GitHub)" <gi...@apache.org>.
rafsun42 closed pull request #1200: Update load csv functions
URL: https://github.com/apache/age/pull/1200


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] markgomer commented on pull request #1200: Update load csv functions

Posted by "markgomer (via GitHub)" <gi...@apache.org>.
markgomer commented on PR #1200:
URL: https://github.com/apache/age/pull/1200#issuecomment-1710164150

   @rafsun42 in 1179 the function auto creates just the labels, while this one also auto creates the graph. I made separately because I didn't know if creating a graph automatically would be wanted, but one PR should close another.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [age] rafsun42 commented on pull request #1200: Update load csv functions

Posted by "rafsun42 (via GitHub)" <gi...@apache.org>.
rafsun42 commented on PR #1200:
URL: https://github.com/apache/age/pull/1200#issuecomment-1710669207

   @markgomer In my _opinion_,  auto creating labels can be more useful than auto creating graphs (since create_graph is a one-time command).  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org