diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-02-11 19:12:16 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-02-11 19:12:16 +0200 |
| commit | 1154d9f2237e5d7f65a25ee241fbded5cde0d082 (patch) | |
| tree | db629fb9e5c48439613fc12e4e962797c8003d09 /src | |
| parent | 06e33799b778c15f99e7aff65375cc7e6dcecee8 (diff) | |
domain_cri: fix random proficiency level on rels
Diffstat (limited to 'src')
| -rw-r--r-- | src/local/domain/cri/domain_cri.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/local/domain/cri/domain_cri.py b/src/local/domain/cri/domain_cri.py index ad1df52d..79add3d3 100644 --- a/src/local/domain/cri/domain_cri.py +++ b/src/local/domain/cri/domain_cri.py @@ -126,7 +126,8 @@ class DBO_random_data_generation__domain__CRI(DB_op): # create links for skill_level in l_attr_set__level: q_arr = ['match (n:%s),(m:%s)' % ('Person', 'Skill'), - 'with n, m', + 'with n, m, rand() as rand', + 'order by rand', 'limit %d' % (lim_r - 1), 'where rand() < %.2f' % (prob_link_create), 'create (n)-[r:%s' % (skill_level), @@ -136,5 +137,4 @@ class DBO_random_data_generation__domain__CRI(DB_op): 'return collect(r.id)', ] - q_param = {'l_attr_set__level': l_attr_set__level} - self.add_statement(q_arr, q_param) + self.add_statement(q_arr, q_param) |
