Skip to content

Commit 19c1734

Browse files
jimidlevil1
andauthored
Create repeatable estimator for Snowflake query history (databrickslabs#924)
_*NB*: This branch is based upon: [chore/coverage-in-core](https://github.com/databrickslabs/remorph/tree/chore/coverage-in-core) and will appear to contain all those changes until that branch is merged into main and this branch is rebased)._ Here we implement a coverage estimation tool allowing an analysis of the query history of a given database. Given connection details for a system, and its dialect (only Snowflake is implemented here as a first step), it will report how much of the query history it is able to parse and transpile into Databricks SQL. While the estimator is currently implemented only for Snowflake, it is intended that a similar report will be provided for each supported database/dialect. A subsequent enhancement will build on this PR to report on SQL complexity. --------- Co-authored-by: Valentin Kasas <[email protected]>
1 parent a56f31e commit 19c1734

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,12 @@ jobs:
145145
- name: Run Unit Tests with Maven
146146
run: mvn --update-snapshots scoverage:report --file pom.xml --fail-at-end
147147

148-
- name: Uplaod remorph-core jars as Artifacts
148+
- name: Upload remorph-core jars as Artifacts
149149
uses: actions/upload-artifact@v4
150150
with:
151151
name: remorph-core-jars
152152
path: ~/.m2/repository/com/databricks/labs/remorph*
153153

154-
155154
- name: Publish JUnit report
156155
uses: EnricoMi/publish-unit-test-result-action@v2
157156
if: always()

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,7 @@ antlr-lint:
6767
mvn compile -DskipTests exec:java -pl linter --file pom.xml -Dexec.args="-i core/src/main/antlr4 -o .venv/linter/grammar -c true"
6868

6969
dev-cli:
70-
mvn -f core/pom.xml dependency:build-classpath -Dmdep.outputFile=target/classpath.txt
70+
mvn -f core/pom.xml dependency:build-classpath -Dmdep.outputFile=target/classpath.txt
71+
72+
estimate-coverage: build_core_jar
73+
java -jar $(wildcard core/target/remorph-core-*-SNAPSHOT.jar) '{"command": "debug-estimate", "flags":{"dst":"$(abspath ${OUTPUT_DIR})", "source-dialect": "snowflake", "console-output": "true"}}'

0 commit comments

Comments
 (0)