<commit_before>require 'jvertica'
require 'dotenv'

# Create .env file like
# HOSTNAME=
# USERNAME=
# PASSWORD=
Dotenv.load

params = {
  host: ENV['HOSTNAME'],
  port: 5433,
  user: ENV['USERNAME'],
  password: ENV['PASSWORD'],
}
puts params

vertica = Jvertica.connect(params)
vertica.query("DROP TABLE sandbox.jvertica_test") rescue nil
vertica.query("CREATE TABLE sandbox.jvertica_test (id integer, str varchar(80))")
vertica.copy("COPY sandbox.jvertica_test FROM STDIN PARSER fjsonparser() NO COMMIT") do |io|<commit_msg>CREATE TABLE IF NOT EXISTS<commit_after>require 'jvertica'
require 'dotenv'

# Create .env file like
# HOSTNAME=
# USERNAME=
# PASSWORD=
Dotenv.load

params = {
  host: ENV['HOSTNAME'],
  port: 5433,
  user: ENV['USERNAME'],
  password: ENV['PASSWORD'],
}
puts params

vertica = Jvertica.connect(params)
vertica.query("CREATE TABLE IF NOT EXISTS sandbox.jvertica_test (id integer, str varchar(80))")
vertica.copy("COPY sandbox.jvertica_test FROM STDIN PARSER fjsonparser() NO COMMIT") do |io|
{'fraction_non_alphanumeric': 0.13163064833005894, 'fraction_numerical': 0.011787819253438114, 'mean_word_length': 5.8389261744966445, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6837549', 'n_tokens_mistral': 386, 'n_tokens_neox': 372, 'n_words': 95}