<commit_before>install_debian_package_dependencies:
  pkg.installed:
    - pkgs:
        - alien
        - unixodbc
        - unixodbc-dev

install_dremio_odbc_driver:
  file.managed:
    - name: /tmp/dremio-odbc.rpm
    - source: http://download.dremio.com/odbc-driver/dremio-odbc-LATEST.x86_64.rpm
  cmd.run:
    - name: alien -i --scripts /tmp/dremio-odbc.rpm
    - require:
        - file: install_dremio_odbc_driver

install_python_dependencies:
  pip.installed:
    - pkgs:
        - pyodbc
        - pandas
    - bin_env: {{ salt.pillar.get('django:pip_path') }}
    - require:
        - pkg: install_debian_package_dependencies

{% for name, fname, target in [
('pyfile', 'dremio_odbc.py', 'redash/query_runner/dremio_odbc.py'),
('dist_logo', 'dremio_odbc.png', 'client/dist/images/db-logos/dremio_odbc.png'),
('asset_logo', 'dremio_odbc.png', 'client/app/assets/images/db-logos/dremio_odbc.png')] %}
download_dremio_datasource_{{ name }}:
  file.managed:
    - name: /opt/redash/{{ target }}
    - source: https://raw.githubusercontent.com/Dezota/DremioDSforRedash/master/{{ fname }}
    - user: redash
    - group: redash<commit_msg>Fixing file download for dremio datasource install<commit_after>install_debian_package_dependencies:
  pkg.installed:
    - pkgs:
        - alien
        - unixodbc
        - unixodbc-dev

install_dremio_odbc_driver:
  file.managed:
    - name: /tmp/dremio-odbc.rpm
    - source: http://download.dremio.com/odbc-driver/dremio-odbc-LATEST.x86_64.rpm
    - skip_verify: True
  cmd.run:
    - name: alien -i --scripts /tmp/dremio-odbc.rpm
    - require:
        - file: install_dremio_odbc_driver

install_python_dependencies:
  pip.installed:
    - pkgs:
        - pyodbc
        - pandas
    - bin_env: {{ salt.pillar.get('django:pip_path') }}
    - require:
        - pkg: install_debian_package_dependencies

{% for name, fname, target in [
('pyfile', 'dremio_odbc.py', 'redash/query_runner/dremio_odbc.py'),
('dist_logo', 'dremio_odbc.png', 'client/dist/images/db-logos/dremio_odbc.png'),
('asset_logo', 'dremio_odbc.png', 'client/app/assets/images/db-logos/dremio_odbc.png')] %}
download_dremio_datasource_{{ name }}:
  file.managed:
    - name: /opt/redash/{{ target }}
    - source: https://raw.githubusercontent.com/Dezota/DremioDSforRedash/master/{{ fname }}
    - user: redash
    - group: redash
    - skip_verify: True
{'fraction_non_alphanumeric': 0.1433994095318431, 'fraction_numerical': 0.003374103753690426, 'mean_word_length': 3.0686106346483704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '816994', 'n_tokens_mistral': 950, 'n_tokens_neox': 902, 'n_words': 125}