Giter VIP home page Giter VIP logo

bim_sort's Introduction

Bim Sort

Bim sort is a command line application to sort Microsoft Analysis Services bim files.

Installation

As an executable

Download the latest version for your operating system from the releases.

From source

git clone https://github.com/girotobial/bim_sort.git
  • build using cargo
cargo build --release
  • Run from the target folder
./target/release/bim_sort

Usage


From the Commandline / Powershell

To simply sort a bim file.

bim_sort <the path to your bim file>

to display the help page

bim_sort -h

Using Bim Sort with pre-commit

To use Bim Sort's official pre-commit integration add the following config:

-   repo: https://github.com/girotobial/bim_merge
    rev: master
    hooks:
    -   id: bim_sort
        name: bim_sort

under the repos section of the your .pre-commit-config.yaml file.

Licence

GNU General Public License version 3

Source Code

Source code is available from https://github.com/girotobial/bim_sort

Project Status

Currently in alpha, looking for testers to validate that all types of bim files can be sorted correctly without errors.

bim_sort's People

Contributors

girotobial avatar

Watchers

 avatar

bim_sort's Issues

Reject unknown fields

At present, if a field is unknown bim_sort will ignore it on read and continue. We should alert the the user of a problem instead.

support PostgresSQL data sources

Support postrgessql data sources.

Example bim.

{
        "type": "structured",
        "name": "PostgreSQL/localhost:5432;flight_db",
        "connectionDetails": {
          "protocol": "postgresql",
          "address": {
            "server": "localhost:5432",
            "database": "flight_db"
          },
          "authentication": null,
          "query": null
        },
        "credential": {
          "AuthenticationKind": "UsernamePassword",
          "kind": "PostgreSQL",
          "path": "localhost:5432;flight_db",
          "Username": "username",
          "EncryptConnection": false
        }
      }

Columns can have annotations

Example

          {
            "name": "Date From",
            "expression": " MIN('Calendar'[Date])",
            "formatString": "dd/MM/yyyy",
            "displayFolder": "Filters",
            "annotations": [
              {
                "name": "Format",
                "value": "<Format Format=\"DateTimeCustom\"><DateTimes><DateTime LCID=\"2057\" Group=\"ShortDate\" FormatString=\"dd/MM/yyyy\" /></DateTimes></Format>"
              }
            ]
          },

Shore up test coverage

Currently sitting at 66% coverage.

Need

  • Unit tests on fundamental structures
  • Integration tests on higher order structures
  • End to End tests on Bim.

Data Source Implementation Tracking

Data Source Tracker

Supported data sources sourced from microsoft documentation

Azure

  • Azure SQL Database
  • Azure Synapse Analytics (SQL DW)
  • Azure Blob Storage
  • Azure Table Storage
  • Azure CosmosDB
  • Azure Data Lake Store Gen1
  • Azure Data Lake Store Gen2
  • Azure HDInsight HDFS
  • Azure HDInsight Spark

File

  • Access Database
  • CSV File
  • Excel Workbook
  • Folder
  • JSON Document
  • Txt File
  • XML table
  • Lines from binary

Database

  • PostgreSQL
  • SQL Server
  • SQL Server Data Warehouse
  • Sybase Database
  • MySQL Database
  • Analysis Services
  • ODBC Query
  • OLE DB
  • Oracle

Onine Services

  • Analytic Platform System
  • Dynamics 365
  • Exchange
  • OData Feed
  • Sharepoint List

SAP

  • SAP Hana
  • SAP Business Warehouse

Salesforce

  • Salesforce Objects
  • Salesforce Reports

sourceColumn & sortByColumn removed from sorted file.

In table columns, if the fields sourceColumn and sortByColumn are provided, they are removed from the output.

{
  "name": "Time Horizon",
  "dataType": "string",
  "sourceColumn": "Name",
  "sortByColumn": "Ordinal"
}

becomes

{
  "name": "Time Horizon",
  "dataType": "string"
}

Measures can have descriptions

          {
            "name": "Spaces Booked",
            "description": "The total number of spaces booked on a course.",
            "expression": [
              "",
              "CALCULATE (",
              "    SUM ( Courses[SeatCount] ),",
              "    FILTER ( 'Calendar', 'Calendar'[Date] >= TODAY () ),",
              "    NOT ( Courses[Cancelled] )",
              ")"
            ],
            "formatString": "#,0",
            "displayFolder": "Spaces"
          },

Add support for MySQL datasources.

Version 0.1.1 doesn't support MySQL datasources/authentication:

example data source

{
  "dataSources": [
        {
          "type": "structured",
          "name": "DbName",
          "connectionDetails": {
            "protocol": "mysql",
            "address": {
              "server": "db.mysql.database.com",
              "database": "MySQLDB"
            },
            "authentication": null,
            "query": null
          },
          "options": {
            "returnSingleDatabase": true
          },
          "credential": {
            "AuthenticationKind": "UsernamePassword",
            "kind": "MySql",
            "path": "db.mysql.database.com;MySQLDB",
            "Username": "[email protected]",
            "EncryptConnection": true,
            "PrivacySetting": "Organizational"
          }
        },
   ]
}

calculationGroup field missing from tables.

calculationGroup field missing from tables

"calculationGroup": {
  "calculationItems": [
    {
      "name": "Next Day",
      "expression": [
        "CALCULATE (",
        "    SELECTEDMEASURE (),",
        "    FILTER ( CourseDate, CourseDate[day_offset] <= 1 )",
        ")"
      ],
      "ordinal": 0
    }
  ]
}

Support KPIs in Measures

Example Measure

{
  "name": "A measure with KPI",
  "description": "A measure with an included KPI field",
  "expression": [
    "",
    "DIVIDE( [Numerator], [Denominator] )"
  ],
  "formatString": "0.00",
  "displayFolder": "A folder",
  "kpi": {
    "targetExpression": "8",
    "targetFormatString": "0.00",
    "statusGraphic": "Road Signs",
    "statusExpression": [
      "",
      "var x=[Some number] return",
      " if ([Some number] > 0, 1, 0) ",
    ],
    "annotations": [
      {
         "name": "GoalType",
         "value": "StaticValue"
      }
    ]
  }
}

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.