Skip to content

Commit

Permalink
feat(test): add test resource
Browse files Browse the repository at this point in the history
  • Loading branch information
MuLeiSY2021 committed Jan 6, 2025
1 parent 701e4d2 commit 04df0ae
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
// Define schema
schema.propertyKey("calendar_date").asDate().ifNotExist().create()
schema.propertyKey("calendar_datetime").asDate().ifNotExist().create()
schema.propertyKey("calendar_timestamp").asDate().ifNotExist().create()
schema.propertyKey("calendar_time").asDate().ifNotExist().create()
schema.propertyKey("calendar_year").asDate().ifNotExist().create()

schema.vertexLabel("date_test")
.useCustomizeNumberId()
.properties("calendar_date", "calendar_datetime", "calendar_timestamp", "calendar_time", "calendar_year")
.nullableKeys("calendar_date", "calendar_datetime", "calendar_timestamp", "calendar_time", "calendar_year")
.ifNotExist()
.create()
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"vertices": [
{
"label": "date_test",
"input": {
"type": "jdbc",
"vendor": "mysql",
"driver": "com.mysql.cj.jdbc.Driver",
"url": "jdbc:mysql://127.0.0.1:3306",
"database": "load_test",
"table": "date_test",
"username": "root",
"password": "root",
"batch_size": 2
},
"id": "id",
"null_values": [
"NULL"
]
}
]
}

0 comments on commit 04df0ae

Please sign in to comment.