Code Monkey home page Code Monkey logo

ansible-mssql-query's People

Contributors

melmorabity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ansible-mssql-query's Issues

Value of unknown type: <class 'decimal.Decimal'

Using below query fails.

      - name: query
        mssql_query:
          login_user: sa
          login_password: "{{ sql_admin_password }}"
          login_host: localhost
          db: msdb
          #as_dict: true
          query: >
                SELECT bcks.database_name, bckS.backup_start_date, bckS.backup_finish_date, CAST(bcks.backup_size / 1073741824.0E AS DECIMAL(10, 2)) as [Backup Size(GB)],
                is_compressed, is_encrypted, physical_device_name
                FROM  msdb.dbo.backupset bckS INNER JOIN msdb.dbo.backupmediaset bckMS
                ON bckS.media_set_id = bckMS.media_set_id
                INNER JOIN msdb.dbo.backupmediafamily bckMF
                ON bckMS.media_set_id = bckMF.media_set_id
                WHERE bckS.backup_finish_date > (SELECT CONVERT(varchar, getdate(), 23))
                ORDER BY bckS.backup_start_date DESC
        register: backupset
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: Value of unknown type: <class 'decimal.Decimal'>, 730.48
fatal: [xx.xx.xx.xx]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 94, in _ansiballz_main\n  File \"<stdin>\", line 40, in invoke_module\n  File \"/usr/lib/python2.7/runpy.py\", line 188, in run_module\n    fname, loader, pkg_name)\n  File \"/usr/lib/python2.7/runpy.py\", line 82, in _run_module_code\n    mod_name, mod_fname, mod_loader, pkg_name)\n  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/tmp/ansible_mssql_query_payload_CE9v8f/ansible_mssql_query_payload.zip/ansible/modules/mssql_query.py\", line 168, in <module>\n  File \"/tmp/ansible_mssql_query_payload_CE9v8f/ansible_mssql_query_payload.zip/ansible/modules/mssql_query.py\", line 164, in main\n  File \"/tmp/ansible_mssql_query_payload_CE9v8f/ansible_mssql_query_payload.zip/ansible/module_utils/basic.py\", line 2072, in exit_json\n  File \"/tmp/ansible_mssql_query_payload_CE9v8f/ansible_mssql_query_payload.zip/ansible/module_utils/basic.py\", line 2065, in _return_formatted\n  File \"/tmp/ansible_mssql_query_payload_CE9v8f/ansible_mssql_query_payload.zip/ansible/module_utils/basic.py\", line 422, in remove_values\n  File \"/tmp/ansible_mssql_query_payload_CE9v8f/ansible_mssql_query_payload.zip/ansible/module_utils/basic.py\", line 401, in _remove_values_conditions\nTypeError: Value of unknown type: <class 'decimal.Decimal'>, 730.48\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Executing the query manually produces no error. Seems that the module does not support decimal datatypes in the output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.