Skip to content

Commit c1a5f3d

Browse files
committed
Use '<NodeLabel>Id' instead of '<NodeLabel>.id' in headers
1 parent e313458 commit c1a5f3d

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/main/scala/ldbc/snb/datagen/transformation/TransformationStage.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,43 +46,43 @@ object TransformationStage extends SparkApp with Logging {
4646
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `id` BIGINT, `locationIP` STRING, `browserUsed` STRING, `content` STRING, `length` INT, `CreatorPersonId` BIGINT, `LocationCountryId` INT, `ParentPostId` BIGINT, `ParentCommentId` BIGINT"
4747
),
4848
Edge("HasTag", "Comment", "Tag", NN) -> Some(
49-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `Comment.id` BIGINT, `Tag.id` INT"
49+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `CommentId` BIGINT, `TagId` INT"
5050
),
5151
Node("Forum") -> Some(
5252
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `id` BIGINT, `title` STRING, `ModeratorPersonId` BIGINT"
5353
),
5454
Edge("HasMember", "Forum", "Person", NN) -> Some(
55-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `Forum.id` BIGINT, `Person.id` BIGINT"
55+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `ForumId` BIGINT, `PersonId` BIGINT"
5656
),
5757
Edge("HasTag", "Forum", "Tag", NN) -> Some(
58-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `Forum.id` BIGINT, `Tag.id` INT"
58+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `ForumId` BIGINT, `TagId` INT"
5959
),
6060
Node("Person") -> Some(
6161
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `id` BIGINT, `firstName` STRING, `lastName` STRING, `gender` STRING, `birthday` DATE, `locationIP` STRING, `browserUsed` STRING, `LocationCityId` INT, `language` STRING, `email` STRING"
6262
),
6363
Edge("HasInterest", "Person", "Tag", NN) -> Some(
64-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `Person.id` BIGINT, `Tag.id` INT"
64+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `PersonId` BIGINT, `TagId` INT"
6565
),
6666
Edge("Knows", "Person", "Person", NN) -> Some(
67-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `Person1.id` BIGINT, `Person2.id` BIGINT"
67+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `Person1Id` BIGINT, `Person2Id` BIGINT"
6868
),
6969
Edge("Likes", "Person", "Comment", NN) -> Some(
70-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `Person.id` BIGINT, `Comment.id` BIGINT"
70+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `PersonId` BIGINT, `CommentId` BIGINT"
7171
),
7272
Edge("Likes", "Person", "Post", NN) -> Some(
73-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `Person.id` BIGINT, `Post.id` BIGINT"
73+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `PersonId` BIGINT, `PostId` BIGINT"
7474
),
7575
Edge("StudyAt", "Person", "University", OneN) -> Some(
76-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `Person.id` BIGINT, `University.id` INT, `classYear` INT"
76+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `PersonId` BIGINT, `UniversityId` INT, `classYear` INT"
7777
),
7878
Edge("WorkAt", "Person", "Company", NN) -> Some(
79-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `Person.id` BIGINT, `Company.id` INT, `workFrom` INT"
79+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `PersonId` BIGINT, `CompanyId` INT, `workFrom` INT"
8080
),
8181
Node("Post") -> Some(
8282
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `explicitlyDeleted` BOOLEAN, `id` BIGINT, `imageFile` STRING, `locationIP` STRING, `browserUsed` STRING, `language` STRING, `content` STRING, `length` INT, `CreatorPersonId` BIGINT, `ContainerForumId` BIGINT, `LocationCountryId` INT"
8383
),
8484
Edge("HasTag", "Post", "Tag", NN) -> Some(
85-
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `Post.id` BIGINT, `Tag.id` INT"
85+
"`creationDate` TIMESTAMP, `deletionDate` TIMESTAMP, `PostId` BIGINT, `TagId` INT"
8686
)
8787
)
8888
)

src/main/scala/ldbc/snb/datagen/transformation/model/package.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ package object model {
4242
override val primaryKey: Seq[String] = ((source, destination) match {
4343
case (s, d) if s == d => Seq(s"${s}1", s"${d}2")
4444
case (s, d) => Seq(s, d)
45-
}).map(name => s"$name.id")
45+
}).map(name => s"${name}Id")
4646

4747
override def toString: String = s"$source -[${`type`}]-> $destination"
4848
}
@@ -53,7 +53,7 @@ package object model {
5353
override val primaryKey: Seq[String] = ((parent, attribute) match {
5454
case (s, d) if s == d => Seq(s"${s}1", s"${d}2")
5555
case (s, d) => Seq(s, d)
56-
}).map(name => s"$name.id")
56+
}).map(name => s"${name}Id")
5757
override def toString: String = s"$parent ♢-[${`type`}]-> $attribute"
5858
}
5959

src/main/scala/ldbc/snb/datagen/transformation/transform/ExplodeAttrs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object ExplodeAttrs extends Transform[Mode.Raw.type, Mode.Raw.type] {
1212
override def transform(input: In): Out = {
1313

1414
def explodedAttr(attr: Attr, node: DataFrame, column: Column) =
15-
attr -> node.select(withRawColumns(attr, $"id".as(s"${attr.parent}.id"), explode(split(column, ";")).as(s"${attr.attribute}.id")))
15+
attr -> node.select(withRawColumns(attr, $"id".as(s"${attr.parent}Id"), explode(split(column, ";")).as(s"${attr.attribute}Id")))
1616

1717
val updatedEntities = input.entities.collect {
1818
case (k@Node("Person", false), v) => Map(

0 commit comments

Comments
 (0)