Babelfish Compass: compatibility assessment tool for Babelfish for PostgreSQL

Overview

Babelfish Compass

Build Status License: Apache 2.0 Latest release

Babelfish Compass is a compatibility assessment tool for Babelfish for PostgreSQL. With Babelfish Compass, users can quickly analyze T-SQL DDL/SQL scripts for compatibility with Babelfish.

Download

Download an executable version here: https://github.com/babelfish-for-postgresql/babelfish_compass/releases/latest.

For release notes, see the download location above. For the compatibility matrix between Babelfish Compass and Babelfish, see the User Guide below.

Documentation

The User Guide is here: https://github.com/babelfish-for-postgresql/babelfish_compass/blob/main/BabelfishCompass_UserGuide.pdf

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Comments
  • Parametrized Statements reported as Dynamic SQL

    Parametrized Statements reported as Dynamic SQL

    I am trying to run compass against an extended events file generated while many .NET apps are running connecting to a big MS SQL Server instance. Client apps are using parameterized statements, which is considered a good practice (preventing sql injection, execution plan reuse, etc.). A parametrized query is mapped to a rpc event using the sp_executesql.

    For example:

    exec sp_executesql N'select id from users where Email=@email', N'@email varchar(200)', @email = '[email protected]'

    These statements are being reported as dynamic sql, which need to be reviewed manually. This makes really hard to assess about the feasibility of the migration to Amazon Babelfish Aurora.

    To workaround this issue, I needed to manipulate the xml file to replace all sp_executesql by the original statement. I'm wondering if this is the expected behavior of the tool. I think the majority of the statements in apps are parameterized, hence I guess it might make sense to have the parser recognizing the content of the sp_executesql.

    Any thoughts?

    opened by bfcamara 3
  • New versioning is using a bad release version

    New versioning is using a bad release version

    The new versioning should be using a version like form, please use 2022.02 with a dot . instead of dash -.

    But the main issue right now is that the released version does not even follow the dash version, the release tag is using v2202-02 which is clearly wrong as it should be v2022-02 instead.

    So as a proposal for a new release, the versioning might be v2022.03 or at least use the correct release tag if the dash is keep.

    opened by jorsol 3
  • Emoji not rendered correctly on MacOs

    Emoji not rendered correctly on MacOs

    The Babelfish Compass reports generate some lines which start with an emoji to indicate the line has a cursor pop-up with additional information. The emoji is http://www.unicode-symbol.com/u/1F6C8.html and on Windows it renders correctly in Firefox, Edge and Chrome, it looks like this: image

    However, there have been cases where on MacOS the emoji is rendered incorrectly in Safari and Firefox, looking like a square with hexadecimal digits inside, like this: image

    However, there have also been reports that the emoji is rendered correctly in MacOS Safari.

    In order to get to the bottom of this, a developer with MacOS is invited to participate in this.

    opened by rcv-aws 3
  • maven-assembly-plugin does not use source or target in its configuration

    maven-assembly-plugin does not use source or target in its configuration

    Description

    Remove incompatible and tags from the maven-assembly-plugin configuration

    Issues Resolved

    Resolves issue #13

    Check List

    • [ ] Commits are signed per the DCO using --signoff

    By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 license.

    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

    opened by brtrvn 3
  • Fix column_constraint parser rule for accepting empty column list

    Fix column_constraint parser rule for accepting empty column list

    Description

    SQL Server DDL definition accepts the following pattern:

    REFERENCES referenced_table_name [ ( ref_column ) ]
    

    There is a related babelfish_extensions' issue and it has a pending PR.

    Proposed patch:

    diff --git a/src/main/parser/TSQLParser.g4 b/src/main/parser/TSQLParser.g4
    index b2fa036..741e06b 100644
    --- a/src/main/parser/TSQLParser.g4
    +++ b/src/main/parser/TSQLParser.g4
    @@ -3225,7 +3225,7 @@ column_constraint
         :(CONSTRAINT constraint=id)?
           ((PRIMARY KEY | UNIQUE) clustered? with_index_options?
           | CHECK for_replication? LR_BRACKET search_condition RR_BRACKET
    -      | (FOREIGN KEY)? REFERENCES table_name LR_BRACKET pk = column_name_list RR_BRACKET (on_update | on_delete)*  for_replication?
    +      | (FOREIGN KEY)? REFERENCES table_name (LR_BRACKET pk = column_name_list RR_BRACKET)? (on_update | on_delete)*  for_replication?
           | DEFAULT expression
           | null_notnull
           | WITH VALUES 
    
    opened by 3manuek 2
  • Problem writing file/folder in OS (windows)

    Problem writing file/folder in OS (windows)

    It seems that the program has a permission problem or error to write to the windows FOLDER.

    I tried with my user and with administrator. Follow the details:

    I did the process on page 21 (captured sql queries) After I saved the profile file I ran the command

    BabelfishCompass.bat MyReport MyCapture.xml -importfmt MSSQLProfilerXML

    presented the following error:

    Babelfish Compass v.2022-07, July 2022 Compatibility assessment tool for Babelfish for PostgreSQL Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

    Reading BabelfishFeatures.cfg Latest Babelfish version supported: 2.1.1: BabelfishFeatures.cfg Creating user configuration file C:...\BabelfishCompass\BabelfishCompassUser.cfg **Error creating** C:\...\BabelfishCompass; please try again Exception in thread "main" java.io.FileNotFoundException: C:...BabelfishCompass\BabelfishCompassUser.cfg (The system cannot find the path specified) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at compass.CompassUtilities.openUserCfgFile(CompassUtilities.java:5940) at compass.CompassUtilities.openUserCfgFileNew(CompassUtilities.java:5935) at compass.CompassConfig.validateUserCfgFile(CompassConfig.java:118) at compass.CompassConfig.validateCfgFile(CompassConfig.java:95) at compass.Compass.main(Compass.java:739)

    So I tried with the command with the -nooverride option

    BabelfishCompass.bat MyReport MyCapture.xml -importfmt MSSQLProfilerXML -nooverride

    presented the following error:

    Babelfish Compass v.2022-07, July 2022 Compatibility assessment tool for Babelfish for PostgreSQL Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

    Reading BabelfishFeatures.cfg Latest Babelfish version supported: 2.1.1: BabelfishFeatures.cfg Skipping C:\Users\RafaelSouza\Documents\BabelfishCompass\BabelfishCompassUser.cfg **Error creating** C:\...\Documents\BabelfishCompass; please try again Error creating C:...\Documents\BabelfishCompass\MyReport; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\imported; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\imported\html; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\imported\sym; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\captured; please try again Error creating C:...\Documents\BabelfishCompass\MyReport\log; please try again Directory C:...\Documents\BabelfishCompass\MyReport\log should exist, but not found. Continuing... Error creating C:...\Documents\BabelfishCompass\MyReport\log; please try again Exception in thread "main" java.io.FileNotFoundException: C:...\Documents\BabelfishCompass\MyReport\log\session-log-MyReport-bbf.2.1.1-2022-ago-17-16.57.24.html (O sistema não pode encontrar o caminho especificado) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at compass.CompassUtilities.openSessionLogFile(CompassUtilities.java:2833) at compass.Compass.main(Compass.java:815)

    Java version:

    C:\temp\BabelfishCompass>java -version
    java version "1.8.0_341"
    Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)
    

    Windows: 10 Pro

    opened by rflsouza 1
  • Update CHANGELOG.md

    Update CHANGELOG.md

    Description

    Updating CHANGELOG.md for release 2022-04

    Issues Resolved

    Updating CHANGELOG.md for release 2022-04

    Check List

    • [x] Commits are signed per the DCO using --signoff

    By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 license.

    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

    opened by rcv-aws 1
  • Jar file execution error

    Jar file execution error

    Hi Team,

    Am trying to execute bablefishcompass but i encounter the below error.

    Error: Unable to access jarfile compass.jar

    i could not find the jar file the downloaded package. Kindly help

    opened by elangodba 1
  • Cannot include input files anywhere on command line

    Cannot include input files anywhere on command line

    We used to be able to place input files anywhere on the command line string we wanted (other than as the first argument). After the addition of the -recursive feature, this does not work 100% of the time.

    opened by brtrvn 1
  • added compatibility matrix to user guide

    added compatibility matrix to user guide

    Description

    added compatibility matrix to user guide

    Issues Resolved

    added compatibility matrix between COmpass version and Babelfish versions, to the user guide

    Check List

    • [ x] Commits are signed per the DCO using --signoff

    By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 license.

    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

    opened by rcv-aws 1
  • V1.2 alter table

    V1.2 alter table

    Description

    minor comment changes only

    Issues Resolved

    minor comment changes only

    Check List

    • [x ] Commits are signed per the DCO using --signoff

    By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 license.

    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

    opened by rcv-aws 1
  • bash script style suggestions

    bash script style suggestions

    A few suggested changes for portability / modernization / robustness of the BabelfishCompass.sh script:

    I changed the shebang argument to '/usr/bin/env bash' for portability. On some Mac and Linux systems, I've observed the preferred bash being in /usr/bin, /usr/local/bin, or other locations other than /bin. The /usr/bin/env idiom uses the first bash that is found in $PATH. Since the script relies on $PATH to locate the 'java' executable, I presume that type of flexibility is OK for this script.

    Along the same lines, I used 'which' to determine the full path to the java executable and assign that to ${JAVA}. To make debugging simpler if ${JAVA} needs to be echoed later, e.g. to figure out if the right JDK/JRE is being used.

    I used $(...) notation instead of ... throughout. Backticks are considered obsolete from a POSIX perspective. See http://mywiki.wooledge.org/BashFAQ/082 or https://unix.stackexchange.com/questions/126927/have-backticks-i-e-cmd-in-sh-shells-been-deprecated for why $() is preferable.

    I added quotes around "$?", for consistency with other 'if [[ ]]' arguments in the script.

    I changed sed to tr in the pipeline stage that deletes double quotes. Just to simplify the action of getting rid of such-and-such characters, without introducing the overhead of a regexp search and replace.

    I changed $* to "$@" where shellscript arguments are passed through to 'java'. That's a change recommended by the 'shellcheck' linter utility, to avoid problems if some of the arguments contain spaces.

    Signed-off-by: John Russell [email protected]

    Description

    Makes the script a little more portable (especially for Mac), maintainable, robust. Reduces warnings from 'shellcheck' utility.

    Issues Resolved

    [List any issues this PR will resolve]

    Check List

    • [Y] Commits are signed per the DCO using --signoff

    By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 license.

    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

    opened by max-webster 0
  • Babelfish supported Cleaned DDL version of database DDL file

    Babelfish supported Cleaned DDL version of database DDL file

    Hi,

    Can we have compass to produce the supported version on DDL file as it accepts the input DDL file to produce the comptability output for the database, can this be further enhanced upon to convert the compatibility to actually DDL file for supported DDL's so customers can simply take this file and run against BBF endpoint rather having to do this manually by themselves.

    Regards, Asif

    opened by amuja 2
  • Add unit tests to Babelfish Compass

    Add unit tests to Babelfish Compass

    Adding unit tests will enable the core team and the community to confidently fix bugs and add features. We also need unit tests to validate that the code is actually doing what we think it is today.

    opened by brtrvn 0
Releases(v.2022-12)
  • v.2022-12(Dec 13, 2022)

    What's New

    • Support for Babelfish v.2.3.0.
    • Include condensed 'Executive Summary' section at top of the report.
    • Dynamic SQL statements consisting only of a string literal are now also analyzed, and the executing statement is not flagged as 'Review Manually'; this is done for EXECUTE(), sp_executesql, sp_prepare, sp_prepexec, sp_cursorprepare, sp_cursorprepexec.
    • Detect and report multiple concatenated constraints in a column definition.
    • New option -userconfigfile to use a specific user-defined .cfg file (default=BabelfishCompassUser.cfg).
    • Include low/medium/high complexity score for not-supported features only.
    • Include complexity score when uploading details with -pgimport.
    • Minor grammar fixes.

    md5 Verification

    BabelfishCompass_v.2022-12.zip (3880c5b15ab26229a24fb110619cc91e)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v.2022-12.zip(1.91 MB)
  • v.2022-11(Nov 29, 2022)

    What's New

    • Report SELECT FOR JSON options.
    • Allow generating a report only when analysis was done on an older Babelfish version.
    • Detecting and reporting scalar user-defined function calls in column defaults and CHECK constraints.
    • Line numbers in Xref reports were not correct for some index-related items.
    • @@error value 50000, via THROW now classified as supported.
    • Indexes with additional included columns exceeding the maximum of 32 now classified as 'Review Performance'.
    • Better error message for some cases of a non-existing report name.
    • Optimization for -pgimport.
    • Fix reporting of duplicate table names for multiple apps in Xref report.
    • Classifying column attributes ROWGUIDCOL,SPARSE,FILESTREAM as Ignored by default.
    • Minor grammar fix.

    md5 Verification

    BabelfishCompass_v.2022-11.zip (351c261fe15f7f62608e214c31d474e4)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v.2022-11.zip(1.90 MB)
  • v.2022-10(Oct 14, 2022)

  • v2022-09(Sep 20, 2022)

    What's New

    • Support for Babelfish v.2.2.0.
    • Mark ALTER TABLE..{ENABLE|DISABLE} TRIGGER as supported since v.1.0.0 (it was incorrectly marked as not supported).
    • Mark CHECKPOINT as not supported (it was incorrectly marked as supported).
    • Add -rewrite support for compound comparison operators containing whitespace.
    • Better detection of non-supported operators and function calls in computed columns.
    • Generating a .csv file to facilitate user-defined quantifying of migration effort.

    md5 Verification

    BabelfishCompass_v2022-09.zip (b1ca5892804518cd59f40202156d31b7)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v2022-09.zip(1.89 MB)
  • v2022-07(Jul 7, 2022)

    What's New

    • Support for Babelfish 1.3.1 and 2.1.1.
    • Add -rewrite support for cases of DATE{PART|NAME|DIFF|ADD}() functions with an unsupported unit argument.
    • Add -rewrite support for DEFAULT parameter values in function/procedure calls.
    • When generating reports from prior analysis, do not lose the rewrite cases from the report.

    md5 Verification

    BabelfishCompass_v2022-07.zip (19ae84def615d5a265a6d4779c820d81)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v2022-07.zip(1.88 MB)
  • v2022-06-a(Jun 29, 2022)

    What's New

    • Consume XML files with queries captured by SQL Server Profiler.
    • Mark cursor variables as supported since v.1.0.0.
    • Better detection of variable dependencies in SELECT.
    • Detect table-valued functions using SELECT TOP.
    • Detect INSERT..EXECUTE() on a single string constant (which is supported).
    • The -rewrite option now handles unquoted strings and double-quoted strings with embedded quotes.
    • Detect syntax issues with UPDATE/DELETE statements when specifying -syntax_issues option (experimental).
    • Performance improvements when analyzing large number of applications together.
    • Reporting improvements with better hyperlinks.
    • Various small fixes.

    md5 Verification

    BabelfishCompass_v2022-06-a.zip (9d0f230a7dcc3004dec58c602da0afe1)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v2022-06-a.zip(1.87 MB)
  • v2022-06(Jun 3, 2022)

    What's New

    • Support for Babelfish v.2.1.0 and 1.3.0.
    • Added -pgimporttable flag.
    • Do not process duplicate input files.
    • Enhancements to -rewrite.
    • Rationalize -delete/-add/-replace options.
    • Exclude additional file types by default.
    • User guide: cleanup, example added.

    md5 Verification

    BabelfishCompass_v2022-06.zip (1f5002bc1a7d2b94f9a4f838c108bada)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v2022-06.zip(1.86 MB)
  • v2022-04(Apr 19, 2022)

    What's New

    • Support for Babelfish v.1.2.1.
    • Automatic check for newer versions of Compass.
    • Record Compass version in session log file.
    • Various small grammar fixes.
    • Skip input files/folders starting with a dot.

    md5 Verification

    BabelfishCompass_v2022-04.zip (840e3281b72002373c00c1fbeb47263b)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v2022-04.zip(1.86 MB)
  • v2022-03-a(Mar 29, 2022)

  • v2022-03(Mar 25, 2022)

    What's New

    • Support for Babelfish v.1.2.0.

    • New -recursive option to process directory trees.

    • New -include and -exclude options to filter on file type.

    • Fix for processing UTF8-with-BOM input files.

    • Various improvements to grammar and reporting.

    md5 Verification

    BabelfishCompass_v2022-03.zip (08be22e582b3e5f77a7c3b317fed3ec3)

    Source code(tar.gz)
    Source code(zip)
    BabelfishCompass_v2022-03.zip(1.85 MB)
  • v2022-02(Mar 7, 2022)

  • v1.2(Jan 26, 2022)

  • v1.1(Nov 15, 2021)

  • v1.0(Oct 28, 2021)

Owner
null
VirtualApp - VirtualApp With Compatibility Of Android 10/11/12

VirtualApp 工程 全新体验,多种优化 特性 高性能、高稳定性、修复构建错误等等 本内核仅供开发人员参考,请勿构建成品并发表到任何地方 仅供自行测试使用 如有修改建议欢迎提交PR 本项目为商业版开源,修改可看commit 开源网站太多使用旧版泄露版商业版或者垃圾版本冒充商业版 不仅不完善,还

图样图森破 478 Sep 8, 2022
Ethylene is a open-source, lightweight, general-purpose compatibility layer standing between the developer and the chaotic world of configuration file formats.

Ethylene Ethylene is a open-source, lightweight, general-purpose compatibility layer standing between the developer and the chaotic world of configura

Steank 7 Aug 9, 2022
A Spring Boot Camel boilerplate that aims to consume events from Apache Kafka, process it and send to a PostgreSQL database.

SPRING-BOOT CAMEL BOILERPLATE This is a Spring-Boot Camel Application model that you can use as a reference to study or even to use in your company. I

Bruno Delgado 45 Apr 4, 2022
Spring Boot, Hibernate, JpaRepository, RESTful services & PostgreSQL.

HRMS-Project Human Resources Management System Back End application with Java, Spring Boot, Hibernate, JpaRepository, RESTful services & PostgreSQL. S

Hikmet Tutuncu 9 Aug 23, 2022
The goal of the project is to create a web application using Java EE and database (PostgreSQL) without connecting a modern technology stack like spring boot and hibernate

About The Project SignIn page SignUp page Profile page The goal of the project is to create a web application using Java EE and database (PostgreSQL)

Islam Khabibullin 2 Mar 23, 2022
Spring Boot Debezium Kafka PostgreSQL Relationship

spring-boot-debezium-db-kafka Spring-Boot-Debezium-Kafka-PostgreSQL Relationship Installation First,Configure docker-compose.yml Second,Write Db-Kafka

null 2 Aug 26, 2022
A code sharing platform built using spring boot, hibernate and JPA as ORM with PostgreSQL which also follows a RESTful architecture.

Snap-Snippet A code sharing platform built using spring boot, hibernate and JPA as ORM with PostgreSQL which also follows a RESTful architecture. Tech

Adnan Hossain 7 Nov 29, 2022
A manager tool to categorize game assets such as images and sounds/music. The tool enables you to tag these files, so that finding them by tags allows fast searches.

BtAssetManager This application allows you to easily categorize large amounts of image and sound files. You can apply tags to each individual file to

null 21 Sep 15, 2022
Scan and patch tool for CVE-2021-44228 and related log4j concerns.

A Log4J2 CVE-2021-44228 Vulnerability Scanner and Patcher Links to download the latest version: Linux x64 with glibc2.17+ (RHEL7+) Windows & all other

SAS Software 33 Jun 1, 2022
A tool for reverse engineering Android apk files

Apktool This is the repository for Apktool. If you are looking for the Apktool website. Click here. It is a tool for reverse engineering 3rd party, cl

Connor Tumbleson 15.4k Jan 4, 2023
JHook - A tool that can dynamically modify Java classes at runtime.

JHook A tool that can dynamically modify Java classes at runtime. Demo Tested on Java 1.8 - Java 17, just support JDK package com.binklac.jhook.test;

VeroFess 11 Dec 23, 2022
Oxygen-log4j-patcher - A tool that upgrades the log4j from an Oxygen installation to version 2.16

Oxygen XML Patch Tool for Apache Log4j vulnerability CVE-2021-44228, CVE-2021-45046 and CVE-2021-45105 This is a tool that updates the log4j version 2

oXygen XML Editor 3 Jan 10, 2022
Sniffy - interactive profiler, testing and chaos engineering tool for Java

Sniffy Sniffy is a Java profiler which shows the results directly in your browser. It also brings profiling to your unit (or rather component) tests a

Sniffy 139 Dec 23, 2022
Unofficial community-built app for the Japanese language learning tool jpdb.io.

jpdb-android Unofficial community-built app for the Japanese language learning tool jpdb.io. While the web app works in most scenarios, the goal with

null 3 Feb 15, 2022
A tool to create flags for Paradox Interactive games.

Iron Workshop Flag Creator Instllation and Usage Instructions Instructional video here: https://youtu.be/0a8xXvN_ygk Flag Creator Purpose and Use The

null 5 Sep 11, 2022
WordleCompanion - A tool to help you determine those hard-to-guess words while doing your daily Wordle puzzles.

A tool to help you determine those hard-to-guess words while doing your daily Wordle puzzles. How it works Enter the 5-letter word you

Ken Vaczi 1 Jan 22, 2022
A simple tool to get method stack

A simple tool to get method stack

赵元超 2 Jan 17, 2022
Tool for providing an HTTP endpoint to retrieve predefined aggregations on metrics of an InfluxDB.

InfluxDB DWH Exporter This application provides an HTTP endpoint that can deliver metrics from an InfluxDB in an aggregated form when called. This can

Novatec Consulting GmbH 1 Jan 18, 2022
A tool ot export, analyse and visualize your transactions, rewards and commissions of your liquidity mining pools or DEX transactions.

VisualTrans A tool ot export, analyse and visualize your transactions, rewards and commissions of your liquidity mining pools or DEX transactions. Doc

Tongjian Cui 15 Mar 11, 2022