Skip to content

Commit

Permalink
changed componenttype to view, and other related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekpradeepmishra authored and burhan94 committed Aug 21, 2023
1 parent 6cee8ff commit 188c525
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 29 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 6 additions & 21 deletions athena-neptune/docs/aws-glue-sample-scripts/automation/config.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
{
"queries": [
"views": [
{
"label":"report1",
"query": "g.V().hasLabel('person').out('follows').valueMap()",
"label":"sourcetodestinationairport",
"query": "g.V().hasLabel('airport').as('source').out('route').as('destination').select('source','destination').by('code').limit(10)",
"properties":[ {
"property" : "lastName",
"property" : "source",
"dataType" : "String",
"isMultiValue" : false,
"isNullable" : false
}, {
"property" : "created",
"dataType" : "Date",
"isMultiValue" : false,
"isNullable" : false
}, {
"property" : "firstname",
"dataType" : "String",
"isMultiValue" : false,
"isNullable" : false
}, {
"property" : "salary",
"dataType" : "Integer",
"isMultiValue" : false,
"isNullable" : false
}, {
"property" : "JobTitle",
"property" : "destination",
"dataType" : "String",
"isMultiValue" : false,
"isNullable" : false
} ]
}]
}
],
"edges" : [ {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function addDatabase(addTablesAfterDatabase) {
});
}

function addTable(tableType, tableName, tableColumns,query) {
function addTable(tableType, tableName, tableColumns, query) {
var params = {
DatabaseName: databaseName, /* required */
TableInput: { /* required */
Expand Down Expand Up @@ -125,8 +125,8 @@ function addTables(data) {
addTable('edge', edge.label, edge.properties);
});

data.queries.forEach(query => {
addTable('query', query.label, query.properties,query.query);
data.views.forEach(view => {
addTable('view', view.label, view.properties,view.query);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ aws glue create-table \
"Location":"s2://dummy-bucket/"},
"Parameters":{
"separatorChar":",",
"componenttype":"query",
"query":"g.V().hasLabel(\"airport\").as(\"s\").out(\"route\").as(\"d\").project(\"source\",\"destination\").by(select(\"s\").id()).by(select(\"d\").id()).limit(10)"
"componenttype":"view",
"query":"g.V().hasLabel(\"airport\").as(\"source\").out(\"route\").as(\"destination\").select(\"source\",\"destination\").by(\"code\").limit(10)"
}
}' \
--profile $1 \
Expand Down
2 changes: 1 addition & 1 deletion athena-neptune/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<artifactId>athena-neptune</artifactId>
<version>2022.47.1</version>
<properties>
<gremlinDriverVersion>3.5.2</gremlinDriverVersion>
<gremlinDriverVersion>3.6.2</gremlinDriverVersion>
<neptune.sigv4.signer.version>2.4.0</neptune.sigv4.signer.version>
</properties>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum SpecialKeys {
}

public enum TableSchemaMetaType {
VERTEX, EDGE, QUERY
VERTEX, EDGE, VIEW
}

public enum GraphType{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void executeQuery(

break;

case QUERY:
case VIEW:
String query = recordsRequest.getSchema().getCustomMetadata().get("query");
Iterator<Result> resultIterator = client.submit(query).iterator();

Expand Down

0 comments on commit 188c525

Please sign in to comment.