@@ -2603,15 +2603,17 @@ def main():
2603
2603
# replace with actual values
2604
2604
record_id = "96523658"
2605
2605
external_id = "external-dt-id22737"
2606
- kind = "DIGITAL_TWIN_KIND_PERSON"
2607
2606
type = "CarOwner"
2608
2607
ingest_property = client_ingest .ingest_property ("something" , "741" )
2609
2608
properties = [ingest_property ]
2610
- upsert = client_ingest .upsert_data_node_digital_twin (
2609
+ upsert = client_ingest .upsert_data_node (
2611
2610
external_id ,
2612
2611
type ,
2613
2612
[],
2614
- properties )
2613
+ properties ,
2614
+ "" ,
2615
+ True
2616
+ )
2615
2617
record = client_ingest .record_upsert (record_id , upsert )
2616
2618
ingest_record_digital_twin = client_ingest .ingest_record (record )
2617
2619
if ingest_record_digital_twin :
@@ -2627,11 +2629,13 @@ def main():
2627
2629
ingest_property = client_ingest .ingest_property ("customProp100" , "9654" )
2628
2630
properties = [ingest_property ]
2629
2631
tags = []
2630
- upsert = client_ingest .upsert_data_node_resource (
2632
+ upsert = client_ingest .upsert_data_node (
2631
2633
external_id ,
2632
2634
type ,
2633
2635
tags ,
2634
- properties )
2636
+ properties ,
2637
+ "" ,
2638
+ False )
2635
2639
record = client_ingest .record_upsert (record_id , upsert )
2636
2640
ingest_record_resource = client_ingest .ingest_record (record )
2637
2641
if ingest_record_resource :
@@ -2645,11 +2649,10 @@ def main():
2645
2649
type = "CAN_USE"
2646
2650
source_match = client_ingest .node_match ("vehicle-1" , "Vehicle" )
2647
2651
target_match = client_ingest .node_match ("lot-1" , "ParkingLot" )
2648
- match = client_ingest .relation_match (source_match , target_match , type )
2649
2652
ingest_property = client_ingest .ingest_property ("customProp" , "8742" )
2650
2653
properties = [ingest_property ]
2651
- upsert = client_ingest .upsert_data_relation (
2652
- match ,
2654
+ upsert = client_ingest .upsert_data_relationship (
2655
+ source_match , target_match , type ,
2653
2656
properties )
2654
2657
record = client_ingest .record_upsert (record_id , upsert )
2655
2658
ingest_record_relation = client_ingest .ingest_record (record )
@@ -2676,8 +2679,8 @@ def main():
2676
2679
type = "CAN_USE"
2677
2680
source_match = client_ingest .node_match ("vehicle-1" , "Vehicle" )
2678
2681
target_match = client_ingest .node_match ("lot-1" , "ParkingLot" )
2679
- relation = client_ingest .relation_match (source_match , target_match , type )
2680
- delete = client_ingest .delete_data_relation (relation )
2682
+ relationship = client_ingest .relationship (source_match , target_match , type , [] )
2683
+ delete = client_ingest .delete_data_relation (relationship )
2681
2684
record = client_ingest .record_delete (record_id , delete )
2682
2685
delete_record_relation = client_ingest .ingest_record (record )
2683
2686
if delete_record_relation :
@@ -2689,8 +2692,8 @@ def main():
2689
2692
elif command == "delete_record_node_property" :
2690
2693
record_id = "745890"
2691
2694
match = client_ingest .node_match ("vehicle-1" , "Vehicle" )
2692
- key = "nodePropertyName"
2693
- node_property = client_ingest .node_property_match (match , key )
2695
+ property_type = "nodePropertyName"
2696
+ node_property = client_ingest .node_property_match (match , property_type )
2694
2697
delete = client_ingest .delete_data_node_property (node_property )
2695
2698
record = client_ingest .record_delete (record_id , delete )
2696
2699
delete_record_node_property = client_ingest .ingest_record (record )
@@ -2705,10 +2708,9 @@ def main():
2705
2708
type = "CAN_USE"
2706
2709
source_match = client_ingest .node_match ("vehicle-1" , "Vehicle" )
2707
2710
target_match = client_ingest .node_match ("lot-1" , "ParkingLot" )
2708
- match = client_ingest .relation_match (source_match , target_match , type )
2709
- key = "relationPropertyName"
2710
- relation_property = client_ingest .relation_property_match (match , key )
2711
- delete = client_ingest .delete_data_relation_property (relation_property )
2711
+ property_type = "relationPropertyName"
2712
+ relationship_property = client_ingest .relationship_property_match (source_match , target_match , type , property_type )
2713
+ delete = client_ingest .delete_data_relation_property (relationship_property )
2712
2714
record = client_ingest .record_delete (record_id , delete )
2713
2715
delete_record_relation_property = client_ingest .ingest_record (record )
2714
2716
if delete_record_relation_property :
@@ -2725,11 +2727,13 @@ def main():
2725
2727
tags = []
2726
2728
ingest_property = client_ingest .ingest_property ("customPropST1904" , "741" )
2727
2729
properties = [ingest_property ]
2728
- upsert = client_ingest .upsert_data_node_digital_twin (
2730
+ upsert = client_ingest .upsert_data_node (
2729
2731
external_id ,
2730
2732
type ,
2731
2733
tags ,
2732
- properties )
2734
+ properties ,
2735
+ "" ,
2736
+ True )
2733
2737
record = client_ingest .record_upsert (record_id , upsert )
2734
2738
2735
2739
record_id2 = "114589905"
@@ -2738,7 +2742,7 @@ def main():
2738
2742
ingest_property = client_ingest .ingest_property ("customProp905" , "9654" )
2739
2743
properties = [ingest_property ]
2740
2744
tags = []
2741
- upsert2 = client_ingest .upsert_data_node_resource (
2745
+ upsert2 = client_ingest .upsert_data_node (
2742
2746
external_id ,
2743
2747
type ,
2744
2748
tags ,
0 commit comments