<commit_before>/*Connect to database*/
\connect mobydq

CREATE ROLE user_group_mobydq;
CREATE ROLE user_group_mobydq_admin;

GRANT user_group_mobydq TO user_group_mobydq_admin;

/*policy for indicator_group*/
CREATE POLICY mobydq_all_group ON
  base.indicator_group
FOR ALL
TO user_group_mobydq
USING (
  user_group = 'user_group_mobydq'
);

/*policy for indicator*/
CREATE POLICY mobydq_all_group ON
  base.indicator
FOR ALL
TO user_group_mobydq
USING (
  user_group = 'user_group_mobydq'
);

/*policy for parameter*/
CREATE POLICY user_group_mobydq_parameter_all ON
  base.parameter
FOR ALL
TO user_group_mobydq
USING (
  user_group = 'user_group_mobydq'
);

/*policies for data_source*/
CREATE POLICY user_group_mobydq_data_source_select ON
  base.data_source
FOR SELECT
TO user_group_mobydq
USING (
  user_group = 'user_group_mobydq'
);

CREATE POLICY mobydq_all_admin ON
  base.data_source
FOR ALL
TO user_group_mobydq_admin
USING (
  user_group = 'user_group_mobydq'
);

/*policy for session*/
CREATE POLICY mobydq_select_group ON
  base.session
FOR SELECT
TO user_group_mobydq
USING (
  user_group = 'user_group_mobydq'
);

/*policy for session_result*/
CREATE POLICY mobydq_select_group ON
  base.session_result
FOR SELECT
TO user_group_mobydq
USING (
  user_group = 'user_group_mobydq'
);

/*policy for batch*/
CREATE POLICY mobydq_select_group ON
  base.batch
FOR SELECT
TO user_group_mobydq
USING (
  user_group = 'user_group_mobydq'
);



/*Create data source*/
INSERT INTO base.data_source (name, connection_string, login, password, data_source_type_id, user_group) VALUES
(<commit_msg>#112 #114 #156 update examples sql<commit_after>/*Connect to database*/
\connect mobydq



/*Create data source*/
INSERT INTO base.data_source (name, connection_string, login, password, data_source_type_id, user_group) VALUES
(
{'fraction_non_alphanumeric': 0.07228915662650602, 'fraction_numerical': 0.004928806133625411, 'mean_word_length': 5.643636363636364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6473877', 'n_tokens_mistral': 692, 'n_tokens_neox': 664, 'n_words': 168}