Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update blog #328

Merged
merged 94 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
8defffd
Test
dpdjvhxm Apr 19, 2024
f11b235
Update gatsby-config.js
dpdjvhxm Apr 19, 2024
96c60e3
Changes search result text
dpdjvhxm Apr 19, 2024
3d1b0ac
Fix gatsby-config.js and title
dpdjvhxm Apr 19, 2024
8e46568
Change meta description
dpdjvhxm Apr 19, 2024
e288f0c
Fix sitemap.xml for broken links
dpdjvhxm Apr 19, 2024
2456d60
Update landing page: Key Update and image
dpdjvhxm Apr 19, 2024
546656b
Merge branch 'apache:new-web' into new-web
dpdjvhxm Apr 21, 2024
7af07ca
Create Blog “2024-04-21-how-to-integrate-langchain-with-apache-age-fo…
dpdjvhxm Apr 21, 2024
8e87f27
Update Blog “2024-04-21-how-to-integrate-langchain-with-apache-age-fo…
dpdjvhxm Apr 21, 2024
ad21d65
Update Blog “2024-04-21-how-to-integrate-langchain-with-apache-age-fo…
dpdjvhxm Apr 21, 2024
f07c2d8
Update blog, cms
dpdjvhxm Apr 22, 2024
8d15658
Update blog
dpdjvhxm Apr 22, 2024
a7092da
Merge branch 'new-web' of https://github.com/dpdjvhxm/age-website int…
dpdjvhxm Apr 22, 2024
4bdf765
Fix spelling error
dpdjvhxm Apr 22, 2024
2067d8b
Activate "blog"
dpdjvhxm Apr 22, 2024
e8b726b
Update download page, modified blog
dpdjvhxm Apr 22, 2024
1f44e81
modified footer, download
dpdjvhxm Apr 22, 2024
72ca937
Update landing image and blog scss
dpdjvhxm Apr 22, 2024
a9126bb
modified: src/components/styles/Blog-post.scss
dpdjvhxm Apr 22, 2024
b4470e7
modified: src/pages/download/index.md
dpdjvhxm Apr 22, 2024
a3be34b
Merge branch 'new-web' into new-web
dpdjvhxm Apr 22, 2024
30ce5d8
Merge branch 'apache:new-web' into new-web
dpdjvhxm Apr 22, 2024
94acf4a
modified: src/templates/blog-post.js
dpdjvhxm Apr 22, 2024
8be135f
Create Blog “2024-04-23-beyond-chatgpt-how-to-maximize-the-use-of-cha…
dpdjvhxm Apr 23, 2024
f555fae
Create Blog “2024-04-23-combating-cyber-attack-with-apache-ages-link-…
dpdjvhxm Apr 23, 2024
87a4019
Create Blog “2024-04-23-from-data-to-connections-leveraging-hyperconn…
dpdjvhxm Apr 23, 2024
3dfeef3
Create Blog “2024-04-23-learn-machine-learning-with-graph-in-hypercon…
dpdjvhxm Apr 23, 2024
3f9fcfe
Create Blog “2024-04-23-graph-database-in-postgresql-apache-age”
dpdjvhxm Apr 23, 2024
2df007f
Create Blog “2024-04-23-comparison-of-apache-age-postgraphile-and-has…
dpdjvhxm Apr 23, 2024
d894a19
modified: static/admin/config.yml
dpdjvhxm Apr 23, 2024
38abf6e
modified: src/components/styles/Blog-post.scss
dpdjvhxm Apr 23, 2024
09461bd
Update Blog “blog_240401”
dpdjvhxm Apr 23, 2024
48a83e0
Match file name format
dpdjvhxm Apr 23, 2024
fad1bbc
deleted: src/pages/blog/blog_240401.md
dpdjvhxm Apr 23, 2024
7bde7fa
Change button color
dpdjvhxm Apr 23, 2024
e182e63
modified: static/sitemap.xml
dpdjvhxm Apr 23, 2024
433b7e5
modified blog
dpdjvhxm Apr 23, 2024
829f112
Merge branch 'new-web' into new-web
dpdjvhxm Apr 23, 2024
eed0ed5
Merge branch 'apache:new-web' into new-web
dpdjvhxm Apr 24, 2024
09ebb8c
modified: src/pages/404.js
dpdjvhxm Apr 25, 2024
db28f40
Create Blog “2024-04-25-discovering-the-inner-workings-of-postgresqls…
dpdjvhxm Apr 25, 2024
b0093a8
Create Blog “2024-04-25-seamless-data-migration-migrating-apache-age-…
dpdjvhxm Apr 25, 2024
a2cc5fa
Create Blog “2024-04-25-how-to-deploy-apache-age-docker-image-on-aws”
dpdjvhxm Apr 25, 2024
23ed8ae
modified: static/admin/config.yml
dpdjvhxm Apr 25, 2024
f0f5c67
modified: src/pages/blog/
dpdjvhxm Apr 25, 2024
034fc3a
Create Blog “2024-05-01-what-is-a-graph-database”
dpdjvhxm May 1, 2024
ad5bba4
modified: src/templates/blog-post.js
dpdjvhxm May 1, 2024
5b0901b
modified: src/pages/blog/
dpdjvhxm May 1, 2024
cea916a
modified: src/pages/blog/
dpdjvhxm May 1, 2024
9288840
Merge branch 'new-web' into new-web
dpdjvhxm May 1, 2024
f2aae70
Remove sign®
dpdjvhxm May 8, 2024
2765481
Merge branch 'apache:new-web' into new-web
dpdjvhxm May 8, 2024
967dcfc
modified ™
dpdjvhxm May 8, 2024
2a2c72b
Merge branch 'apache:new-web' into new-web
dpdjvhxm May 11, 2024
7ebd325
Merge branch 'apache:new-web' into new-web
dpdjvhxm May 21, 2024
3a4f1a8
Create Blog “2024-05-21-a-dockerhub-guide”
dpdjvhxm May 21, 2024
7fd0eb5
Create Blog “2024-05-21-a-beginners-guide-to-downloading-docker”
dpdjvhxm May 21, 2024
515dd9c
Create Blog “2024-05-21-basic-understanding-what-is-a-container”
dpdjvhxm May 21, 2024
076d324
Create Blog “2024-05-21-navigating-the-maze-of-data-with-apache-age-a…
dpdjvhxm May 21, 2024
1afb8fe
Create Blog “2024-05-21-how-to-use-the-official-apache-age-docker-image”
dpdjvhxm May 21, 2024
8cf0b31
modified blogs
dpdjvhxm May 21, 2024
c91f4f4
Update Blog “2024-05-21-a-dockerhub-guide”
dpdjvhxm May 21, 2024
940de65
modified BlogRoll
dpdjvhxm May 21, 2024
fa497ce
Merge branch 'new-web' of https://github.com/dpdjvhxm/age-website int…
dpdjvhxm May 21, 2024
f1df5d4
modified BlogRollTemplate
dpdjvhxm May 21, 2024
190f9df
new file: static/ads.txt
dpdjvhxm May 23, 2024
afb21a0
Merge branch 'apache:new-web' into new-web
dpdjvhxm May 28, 2024
fcea00d
Create Blog “2024-06-12-integrating-apache-age-docker-image-and-pgadm…
dpdjvhxm Jun 12, 2024
a6d5bcc
Create Blog “2024-06-12-video-the-easiest-way-to-install-apache-age-d…
dpdjvhxm Jun 12, 2024
eea36d0
Add file
dpdjvhxm Jun 12, 2024
4d2d313
modified and renamed
dpdjvhxm Jun 12, 2024
a892182
modified and renamed
dpdjvhxm Jun 12, 2024
6ec706e
Create Blog “2024-06-12-video-beginners-guide”
dpdjvhxm Jun 12, 2024
333b856
Create Blog “2024-06-12-video-future-landscape-of-graph-db”
dpdjvhxm Jun 12, 2024
d63489e
Update Blog “2024-06-12-video-future-landscape-of-graph-db”
dpdjvhxm Jun 12, 2024
c99eaea
Create Blog “2024-06-12-video-future-landscape-of-graph-db-1”
dpdjvhxm Jun 12, 2024
c7a2474
new file and modified
dpdjvhxm Jun 12, 2024
58cfe27
modified
dpdjvhxm Jun 12, 2024
aa3e970
renamed
dpdjvhxm Jun 12, 2024
5d5f275
modified: src/templates/index-page.js
dpdjvhxm Jun 12, 2024
f031a9b
modified: src/pages/blog/2024-06-12
dpdjvhxm Jun 12, 2024
d53f865
renamed
dpdjvhxm Jun 12, 2024
cab916c
Merge branch 'apache:new-web' into new-web
dpdjvhxm Jun 12, 2024
e38a9fa
Create Blog “2024-06-17-integrating-apache-age-with-python”
dpdjvhxm Jun 17, 2024
574852f
Update Blog “2024-06-17-integrating-apache-age-with-python”
dpdjvhxm Jun 17, 2024
f275efd
modified
dpdjvhxm Jun 17, 2024
51fc165
Create Blog “2024-06-21-video-graph-databases-and-apache-age”
dpdjvhxm Jun 21, 2024
0deb18c
modified & new file
dpdjvhxm Jun 21, 2024
553bf99
modified
dpdjvhxm Jun 21, 2024
dda9f15
modified
dpdjvhxm Jun 21, 2024
9ecbda4
# This is a combination of 4 commits.
dpdjvhxm Jun 17, 2024
749ecab
Merge branch 'new-web' of https://github.com/dpdjvhxm/age-website int…
dpdjvhxm Jun 21, 2024
b00c6da
modified
dpdjvhxm Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions src/pages/blog/2024-06-17-integrating-apache-age-with-python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
templateKey: blog-post
title: Integrating Apache AGE with Python
date: 2024-06-17T07:00:30.672Z
description: Integrating Apache AGE with Python
featuredpost: true
featuredimage:
---
<!--StartFragment-->

Apache AGE (A Graph Extension) is a PostgreSQL extension that provides graph database functionality. Integrating Apache AGE with Python allows you to leverage this functionality within your Python applications. This guide will walk you through the process of setting up the integration and running a sample code.

#### Prerequisites

For this task, we will use the Apache AGE Docker image.

So before you begin, ensure you have the following installed:

* Docker;
* Apache AGE image already pulled and executed once (Refer to past tutorials for this);
* Python (version 3.9 or later);

You will need psycopg2 and antlr4-python3 packages to run it. You can install them by executing the requirements.txt file inside the directory age/drivers/python.

To do so, navigate to the said python driver directory, then run

pip install -r requirements.txt

#### Testing

You can test if everything is working by issuing the command at the same directory:

```python
python test_age_py.py \
-host "127.0.0.1" \
-db "postgres" \
-u "postgres" \
-pass "agens" \
-port 5432 \
-gn "test_graph"
```

<!--EndFragment-->

#### Setup

To use the "age" library, you will need to install it, so, in the same directory, there's a setup.py file. Execute it with

```
python setup.py install
```

Now we're ready to use Apache AGE in Python!

#### Starting the server

But first, be sure to put your postgres server to run. I prefer using Docker, so issue this command:

```
docker start age
```

#### Writing the Python Code

Here is a sample Python script to connect to the PostgreSQL database, create a graph, and perform basic operations using Apache AGE.

```
import age

GRAPH_NAME = "test_graph"

"""
Define the connection parameters (host, port, database name, user, and password).
Here, we use the default Apache AGE Docker container settings
"""
CONFIG = (
"host=127.0.0.1 \
port=5455 \
dbname=postgresDB \
user=postgresUser \
password=postgresPW"
)

try:
# Establish a connection to the PostgreSQL database using the defined parameters.
connection = age.connect(graph=GRAPH_NAME, dsn=CONFIG)

# The Cypher query `CREATE (n:Person {name: 'Maria'}) RETURN n` creates a node with the label `Person` and a property `name` set to 'Maria'.
query = "CREATE (n:Person {name: 'Maria'}) RETURN n"

# The `execCypher` method sends the query to the database.
cursor = connection.execCypher(query)

# Print the results
for row in cursor:
print("CREATED: ", row[0])

# Save the changes to the database.
connection.commit()

except Exception as e:
print(f"Error: {e}")
connection.rollback()
finally:
# Clean up: delete the graph and close the connection
age.deleteGraph(connection.connection, GRAPH_NAME)
cursor.close()
connection.close()
```

#### Step 4: Running the Script

* Save the code to a file, for example, age_integration.py.
* Run the script:

```
python age_integration.py
```

It should output something close to this:

```
CREATED: {label:Person, id:844424930131969, properties:{name: Maria, }}::VERTEX
```

#### Conclusion

Integrating Apache AGE with Python allows you to utilize powerful graph database features within your Python applications. By following this guide, you can set up the integration, run queries, and manage graph data efficiently. This integration opens up new possibilities for handling complex relationships and structures in your data.

If you run into any problems, don't hesitate to reach out.

<!--EndFragment-->
99 changes: 99 additions & 0 deletions src/pages/blog/2024-06-21-video-graph-databases-and-apache-age.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
templateKey: blog-post
title: "[ Video ] Graph databases and Apache AGE"
date: 2024-06-21T01:17:22.666Z
description:
featuredpost: true
featuredimage:
---
<div style="display: flex; justify-content: center; align-items: center; ">
<video width="960" height="540" controls>
<source src="../../../static/img/f_1.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</br>

**1 st : Introduction:**</br>
Introduction. The rise of graph databases. Data is everywhere. It&#39;s the lifeblood of our digital age,
but data alone is not enough. We need to understand the relationships within data to unlock its
true potential. This is where graph databases come into play. Unlike traditional databases, graph
databases excel in understanding connections. They efficiently represent and query relationships.
Graph databases are purpose-built for this challenge, ideal for social networks, recommendation
engines, and fraud detection. Each user is an entity, and their connections are the relationships.
Each user is an entity, and their connections are the relationships. Graph databases can answer
complex queries with remarkable speed.

---
</br>

<div style="display: flex; justify-content: center; align-items: center; ">
<video width="960" height="540" controls>
<source src="../../../static/img/f_2.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</br>

**2 nd : Understanding the essence of graph structures**</br>
Understanding the essence of graph structures. At the heart of every graph database lie three
fundamental concepts. Nodes, edges and properties. These elements work together to represent
and organize data in a way that mirrors the interconnected nature of information in the real
world. Understanding these building blocks is key to unlocking the power of graph databases.
Nodes, also known as vertices, represent the entities within our data. In a social network, a node
could be a user, a post, or a group. In a transportation network, nodes could represent cities,
airports, or train stations. Each node encapsulates a distinct piece of information within the
graph. Edges, on the other hand, represent the relationships between these entities. They are the
connecting lines that establish how nodes interact with each other.
Returning to our social network example, an edge might signify a friendship between two users,
or a likes relationship between a user and a post. Edges give context to nodes and highlight the
interconnectedness of our data. Finally, properties provide further details about nodes and edges.
They are attributes that enrich our understanding of the entities and relationships within the
graph. For instance, a user node might have properties like name, age, and location, while a
friendship edge could have properties like date created or connection strength.
Properties add depth and nuance to our graph representation. Together, nodes, edges, and
properties form the basic building blocks of a graph database. They provide a flexible and
expressive way to model a wide range of real-world scenarios, from social networks and
recommendation engines to fraud detection systems and knowledge graphs. By understanding
these fundamental concepts, we can begin to harness the power of graph databases to unravel the
complexities hidden within our data. Apache Age, an extension for PostgreSQL enhances our
ability to manage and understand complex data relationships.
By integrating graph database capabilities directly into PostgreSQL, Apache Edge allows us to
leverage the strengths of both relational and graph databases. This integration simplifies the
process of querying and visualizing complex data relationships, making it easier to uncover
insights and patterns. making it easier to uncover insights and patterns. Whether you&#39;re working
on social networks, recommendation systems, or fraud detection, Apache Age provides the tools
needed to enhance your data analysis within PostgreSQL.

---
</br>

<div style="display: flex; justify-content: center; align-items: center; ">
<video width="960" height="540" controls>
<source src="../../../static/img/f_3.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</br>

**3 rd : PostgreSQL with Apache Age, a powerful combination.**</br>
While graph databases offer a compelling approach to managing relationships, many organizations have existing investments in
relational databases like PostgreSQL. Fortunately, Apache Age brings the power of
graph databases directly into the familiar realm of PostgreSQL, offering a seamless way to
integrate graph capabilities into existing SQL-based workflows. Apache Edge extends
PostgreSQL with the ability to store, query, and analyze graph data using Open Cypher, a widely
adopted graph query language.
This integration means that developers and data scientists can leverage their existing SQL skills
and tools while benefiting from the expressiveness of graph databases. No need to learn a
completely new database system or migrate existing data. Installing Apache Edge on
PostgreSQL is straightforward, involving simple commands to add the extension to your
PostgreSQL instance. Once installed, you can start modeling your data using familiar graph
concepts. Define your nodes and edges, specify properties, and begin populating your graph
database within the comfortable confines of PostgreSQL. Querying your graph data is equally
intuitive. Apache Edge allows you to use Open Cypher queries directly within your PostgreSQL
environment.
This powerful combination enables you to perform complex graph traversals, pattern matching
This powerful combination enables you to perform complex graph traversals, pattern matching
and analysis, all while leveraging the robustness and familiarity of PostgreSQL.

</br>
Binary file added static/img/f_1.mp4
Binary file not shown.
Binary file added static/img/f_2.mp4
Binary file not shown.
Binary file added static/img/f_3.mp4
Binary file not shown.
Loading