Skip to content

Commit ff649b3

Browse files
Merge branch 'main' into feature/declare-variable-support
2 parents 1226d4a + ff3d15a commit ff649b3

File tree

7 files changed

+27
-13
lines changed

7 files changed

+27
-13
lines changed

docs/lakebridge/docs/installation.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,20 @@ databricks labs lakebridge install-transpile
112112

113113
<img src={useBaseUrl('img/transpile-install.gif')} alt="transpile-install" />
114114

115+
116+
:::tip
117+
#### Override the default[Bladebridge] config:
118+
119+
There is an option for you to override the default config file that `Lakebridge` uses for converting source code from dialects like `informatica`, `datastage`, `synapse`,
120+
`orcale` etc. During installtion you may use your own custom config file and `Lakebridge` will override the config with the one you would provide. You can only setup this
121+
override during installation.
122+
123+
Specify the config file to override the default[Bladebridge] config during installation:
124+
```bash
125+
Specify the config file to override the default[Bladebridge] config - press <enter> for none (default: <none>): <local_full_path>/custom_<source>2databricks.json
126+
```
127+
:::
128+
115129
### Verify Installation
116130
Verify the successful installation by executing the provided command; confirmation of a successful installation is indicated when the displayed output aligns with the example screenshot provided:
117131
```bash
@@ -136,7 +150,7 @@ databricks labs lakebridge configure-reconcile
136150
### SQL Warehouse for Reconcile
137151

138152
While configuring the reconcile properties, lakebridge by default creates a SQL warehouse. lakebridge uses user profile to authenticate to any Databricks resource and hence
139-
if the user running this command doesn't have permission to create SQL warehouse, the configure-reconcile would fail. In this case users can provide the
153+
if the user running this command doesn't have permission to create SQL warehouse, the configure-reconcile would fail. In this case users can provide the
140154
`warehouse_id` of an already created SQL warehouse that they have atleast CAN_USE permission on in the databricks profile (`~/.databrickscfg`) using which they
141155
are running the lakebridge commands and lakebridge would use that warehouse to complete the reconcile configuration instead of trying to create a new one.
142156

docs/lakebridge/docs/transpile/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ choose to configure this at the time of installation, or choose defaults/set lat
2020
transpile call.
2121

2222
The `transpile` command will trigger the conversion of the specified code, these are the available arguments:
23-
- `source-dialect [Required]` - Dialect name (ex: snowflake, oracle, datastage, etc)
2423
- `input-source [Required]` - The path to the SQL file or directory containing SQL files to be transpiled.
2524
- `output-folder [Optional]` - The path to the output folder where the transpiled SQL files will be stored. If not specified,
2625
the transpiled SQL files will be stored in a folder called `transpiled` in your current working directory.
26+
- `source-dialect [Optional]` - Dialect name (ex: snowflake, oracle, datastage, etc). If not specified, refers to the Source Dialect selected at installation time.
2727
- `error-file-path [Optional]` - The path to the file where the transpile errors will be stored. If not specified, the
2828
errors will be stored in a file called `errors.log` in your current working directory.
2929
- `skip-validation [Optional]` - The default value is True. If set to False, the transpiler will validate the transpiled SQL scripts against the Databricks catalog and schema provided by user.

docs/lakebridge/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
},
6060
"resolutions": {
6161
"brace-expansion": "^1.1.12",
62-
"webpack-dev-server": "^5.2.1"
62+
"webpack-dev-server": "^5.2.1",
63+
"on-headers": ">=1.1.0"
6364
}
6465
}

docs/lakebridge/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7509,10 +7509,10 @@ on-finished@2.4.1, on-finished@^2.4.1:
75097509
dependencies:
75107510
ee-first "1.1.1"
75117511

7512-
on-headers@~1.0.2:
7513-
version "1.0.2"
7514-
resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f"
7515-
integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==
7512+
on-headers@>=1.1.0, on-headers@~1.0.2:
7513+
version "1.1.0"
7514+
resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.1.0.tgz#59da4f91c45f5f989c6e4bcedc5a3b0aed70ff65"
7515+
integrity sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==
75167516

75177517
onetime@^5.1.2:
75187518
version "5.1.2"

labs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ commands:
2222
description: Transpile SQL script to Databricks SQL
2323
flags:
2424
- name: transpiler-config-path
25-
description: Path to the transpiler configuration file
25+
description: Path to the transpiler configuration file [Pluggable Transpilers] eg:- Morpheus/Bladebridge
2626
default: null
2727
- name: source-dialect
28-
description: Dialect name
28+
description: Dialect name as selected during `install-transpile` or refer to documentation
2929
default: null
3030
- name: input-source
3131
description: Input Script Folder or File
3232
default: null
3333
- name: output-folder
34-
description: Output Location For Storing Transpiled Code, defaults to input-source folder
34+
description: Output Location For Storing Transpiled Code, defaults to (Current Working Directory) `<pwd>/transpiled` folder
3535
default: null
3636
- name: error-file-path
37-
description: Output Location For Storing Errors, defaults to input-source folder
37+
description: Output Location For Storing Errors, defaults to (Current Working Directory) `<pwd>/errors.log`
3838
default: null
3939
- name: skip-validation
4040
description: Validate Transpiled Code, default True validation skipped, False validate

tests/resources/transpiler_configs/bladebridge/lib/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ options:
1919
all:
2020
- flag: "overrides-file"
2121
method: QUESTION
22-
prompt: "Specify the file to use for overrides - press <enter> for none"
22+
prompt: "Specify the config file to override the default[Bladebridge] config - press <enter> for none"
2323
default: "<none>"
2424
datastage:
2525
- flag: "target-tech"

tests/unit/transpiler/test_sqlglot_engine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def test_safe_parse(transpiler, transpile_config):
114114
)
115115
for exp in result:
116116
if exp.parsed_expression:
117-
print("yes")
118117
assert repr(exp.parsed_expression.args["expressions"]) == repr(expected_result)
119118
assert repr(exp.parsed_expression.args["from"]) == repr(expected_from_result)
120119
assert error[0].transpile_error.code == "PARSE_ERROR"

0 commit comments

Comments
 (0)