databricks-labs-lakebridge 0.10.3__py3-none-any.whl → 0.10.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- databricks/labs/lakebridge/__about__.py +1 -1
- databricks/labs/lakebridge/cli.py +11 -6
- databricks/labs/lakebridge/install.py +0 -16
- databricks/labs/lakebridge/transpiler/execute.py +7 -2
- {databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/METADATA +2 -2
- {databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/RECORD +10 -10
- {databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/WHEEL +0 -0
- {databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/entry_points.txt +0 -0
- {databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/licenses/LICENSE +0 -0
- {databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/licenses/NOTICE +0 -0
@@ -1,2 +1,2 @@
|
|
1
1
|
# DO NOT MODIFY THIS FILE
|
2
|
-
__version__ = "0.10.
|
2
|
+
__version__ = "0.10.5"
|
@@ -132,7 +132,7 @@ def transpile(
|
|
132
132
|
logger.debug(f"Final configuration for transpilation: {config!r}")
|
133
133
|
|
134
134
|
assert config.source_dialect is not None, "Source dialect has been validated by this point."
|
135
|
-
with_user_agent_extra("transpiler_source_tech", config.source_dialect)
|
135
|
+
with_user_agent_extra("transpiler_source_tech", make_alphanum_or_semver(config.source_dialect))
|
136
136
|
plugin_name = engine.transpiler_name
|
137
137
|
plugin_name = re.sub(r"\s+", "_", plugin_name)
|
138
138
|
with_user_agent_extra("transpiler_plugin_name", plugin_name)
|
@@ -639,27 +639,32 @@ def configure_reconcile(w: WorkspaceClient):
|
|
639
639
|
with_user_agent_extra("cmd", "configure-reconcile")
|
640
640
|
user = w.current_user
|
641
641
|
logger.debug(f"User: {user}")
|
642
|
-
|
643
|
-
|
642
|
+
if not w.config.warehouse_id:
|
643
|
+
dbsql_id = _create_warehouse(w)
|
644
|
+
w.config.warehouse_id = dbsql_id
|
645
|
+
logger.debug(f"Warehouse ID used for configuring reconcile: {w.config.warehouse_id}.")
|
644
646
|
installer = _installer(w)
|
645
647
|
installer.run(module="reconcile")
|
646
|
-
_remove_warehouse(w, dbsql_id)
|
647
648
|
|
648
649
|
|
649
650
|
@lakebridge.command()
|
650
|
-
def analyze(w: WorkspaceClient, source_directory: str, report_file: str):
|
651
|
+
def analyze(w: WorkspaceClient, source_directory: str, report_file: str, source_tech: str | None = None):
|
651
652
|
"""Run the Analyzer"""
|
652
653
|
with_user_agent_extra("cmd", "analyze")
|
653
654
|
ctx = ApplicationContext(w)
|
654
655
|
prompts = ctx.prompts
|
655
656
|
output_file = report_file
|
656
657
|
input_folder = source_directory
|
657
|
-
source_tech
|
658
|
+
if source_tech is None:
|
659
|
+
source_tech = prompts.choice("Select the source technology", Analyzer.supported_source_technologies())
|
658
660
|
with_user_agent_extra("analyzer_source_tech", make_alphanum_or_semver(source_tech))
|
659
661
|
user = ctx.current_user
|
660
662
|
logger.debug(f"User: {user}")
|
661
663
|
is_debug = logger.getEffectiveLevel() == logging.DEBUG
|
662
664
|
Analyzer.analyze(Path(input_folder), Path(output_file), source_tech, is_debug=is_debug)
|
665
|
+
logger.info(
|
666
|
+
f"Successfully Analyzed files in ${source_directory} for ${source_tech} and saved report to {report_file}"
|
667
|
+
)
|
663
668
|
|
664
669
|
|
665
670
|
if __name__ == "__main__":
|
@@ -182,22 +182,6 @@ class WheelInstaller(TranspilerInstaller):
|
|
182
182
|
logger.error(f"Error while fetching PyPI metadata: {product_name}", exc_info=e)
|
183
183
|
return None
|
184
184
|
|
185
|
-
@classmethod
|
186
|
-
def download_artifact_from_pypi(cls, product_name: str, version: str, target: Path, extension="whl") -> int:
|
187
|
-
suffix = "-py3-none-any.whl" if extension == "whl" else ".tar.gz" if extension == "tar" else f".{extension}"
|
188
|
-
filename = f"{product_name.replace('-', '_')}-{version}{suffix}"
|
189
|
-
url = f"https://pypi.debian.net/{product_name}/{filename}"
|
190
|
-
try:
|
191
|
-
path, _ = request.urlretrieve(url)
|
192
|
-
logger.info(f"Successfully downloaded {path}")
|
193
|
-
if not target.exists():
|
194
|
-
logger.info(f"Moving {path} to {target!s}")
|
195
|
-
move(path, target)
|
196
|
-
return 0
|
197
|
-
except URLError as e:
|
198
|
-
logger.error("While downloading from pypi", exc_info=e)
|
199
|
-
return -1
|
200
|
-
|
201
185
|
def __init__(self, product_name: str, pypi_name: str, artifact: Path | None = None):
|
202
186
|
self._product_name = product_name
|
203
187
|
self._pypi_name = pypi_name
|
@@ -49,8 +49,9 @@ class TranspilingContext:
|
|
49
49
|
|
50
50
|
|
51
51
|
async def _process_one_file(context: TranspilingContext) -> tuple[int, list[TranspileError]]:
|
52
|
+
input_path = context.input_path
|
52
53
|
|
53
|
-
logger.debug(f"Started processing file: {
|
54
|
+
logger.debug(f"Started processing file: {input_path}")
|
54
55
|
|
55
56
|
if not context.config.source_dialect:
|
56
57
|
error = TranspileError(
|
@@ -62,7 +63,11 @@ async def _process_one_file(context: TranspilingContext) -> tuple[int, list[Tran
|
|
62
63
|
)
|
63
64
|
return 0, [error]
|
64
65
|
|
65
|
-
|
66
|
+
# Check if it looks like XML, where we need to sniff the encoding instead of relying on a BOM or defaulting to the
|
67
|
+
# local platform encoding.
|
68
|
+
sniff_xml_encoding = input_path.suffix.lower() == ".xml"
|
69
|
+
|
70
|
+
source_code = read_text(input_path, detect_xml=sniff_xml_encoding)
|
66
71
|
context = dataclasses.replace(context, source_code=source_code)
|
67
72
|
|
68
73
|
transpile_result = await _transpile(
|
{databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: databricks-labs-lakebridge
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.5
|
4
4
|
Summary: Fast and predictable migrations to Databricks Lakehouse Platform. This tool is designed to help you migrate your data and workloads to the Databricks Lakehouse Platform in a fast, predictable, and reliable way. It provides a set of tools and utilities to help you reconcile your data and workloads, assess your current state, and plan your migration.
|
5
5
|
Project-URL: Documentation, https://databrickslabs.github.io/lakebridge
|
6
6
|
Project-URL: Issues, https://github.com/databrickslabs/lakebridge/issues
|
@@ -26,7 +26,7 @@ Classifier: Topic :: Utilities
|
|
26
26
|
Requires-Python: >=3.10
|
27
27
|
Requires-Dist: cryptography<45.1.0,>=44.0.2
|
28
28
|
Requires-Dist: databricks-bb-analyzer~=0.1.9
|
29
|
-
Requires-Dist: databricks-labs-blueprint[yaml]<0.12.0,>=0.11.
|
29
|
+
Requires-Dist: databricks-labs-blueprint[yaml]<0.12.0,>=0.11.3
|
30
30
|
Requires-Dist: databricks-labs-lsql==0.16.0
|
31
31
|
Requires-Dist: databricks-sdk~=0.51.0
|
32
32
|
Requires-Dist: duckdb~=1.2.2
|
{databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/RECORD
RENAMED
@@ -8,12 +8,12 @@ docs/lakebridge/src/theme/Footer/index.tsx,sha256=Jj8zY5WDiTLXwF_mAgld8Dh1A3MY1H
|
|
8
8
|
docs/lakebridge/src/theme/Layout/index.tsx,sha256=IkdLr13jKmLxT0jWQqrwqrjVXc8Rwd_kWNpTd1t2sc0,592
|
9
9
|
databricks/__init__.py,sha256=YqH8Hy8lHJxd0hLMZF6kWirUDdPiX90LRDX6S6yTMn0,261
|
10
10
|
databricks/labs/__init__.py,sha256=YqH8Hy8lHJxd0hLMZF6kWirUDdPiX90LRDX6S6yTMn0,261
|
11
|
-
databricks/labs/lakebridge/__about__.py,sha256=
|
11
|
+
databricks/labs/lakebridge/__about__.py,sha256=I-rxjdEQtJwfk11pg66LiskWUXIpHZGxnU39vNXcHwM,49
|
12
12
|
databricks/labs/lakebridge/__init__.py,sha256=nUNECqNvyfpT0aeWwlqG0ADT8U8ScCLb8WWpLydppcA,464
|
13
13
|
databricks/labs/lakebridge/base_install.py,sha256=8NxXsNpgqXnuADKXVFh5oQL3osdvygRMY1amJwKfU08,490
|
14
|
-
databricks/labs/lakebridge/cli.py,sha256=
|
14
|
+
databricks/labs/lakebridge/cli.py,sha256=VJHfy665ln7w-8e4xX18TXemT-XYVVQrXQKA0FkB-VI,31903
|
15
15
|
databricks/labs/lakebridge/config.py,sha256=IjxvphM9fRQHQ2FAxwZ23deJGgSemJ3rMV0sp1Ob6e8,5833
|
16
|
-
databricks/labs/lakebridge/install.py,sha256=
|
16
|
+
databricks/labs/lakebridge/install.py,sha256=x8YQwX-EwSKGYKHeotzUwADfzBrvFeplDHbjifLq9mA,39757
|
17
17
|
databricks/labs/lakebridge/jvmproxy.py,sha256=F9pXpemzdaJXwpshHxVM9PYU_eNn4zTCUFQ5vc9WIhA,1573
|
18
18
|
databricks/labs/lakebridge/lineage.py,sha256=Q2oky4RkODRHWMwIQIwbYXSdZTmRkMWwEh6RssBiQxY,1843
|
19
19
|
databricks/labs/lakebridge/uninstall.py,sha256=hf36YgeW9XO2cRvvn6AXUZdihQ1ZMHnR38OVEF5sfRw,759
|
@@ -147,7 +147,7 @@ databricks/labs/lakebridge/resources/reconcile/queries/installation/details.sql,
|
|
147
147
|
databricks/labs/lakebridge/resources/reconcile/queries/installation/main.sql,sha256=s_A0YyGSX_pCWnQsQnY65VYFcbNvq2qKJvYxU6zam6E,794
|
148
148
|
databricks/labs/lakebridge/resources/reconcile/queries/installation/metrics.sql,sha256=FdvjQp7gCwsbcu4UrOuJN-bBLJFpvUIyxH6PQvg04Wo,1006
|
149
149
|
databricks/labs/lakebridge/transpiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
150
|
-
databricks/labs/lakebridge/transpiler/execute.py,sha256=
|
150
|
+
databricks/labs/lakebridge/transpiler/execute.py,sha256=AgsOGQtmPfCoWYP9U1cYezY14UjGx6TPR_PU1NAY6sE,17268
|
151
151
|
databricks/labs/lakebridge/transpiler/transpile_engine.py,sha256=5zC8fkpBBlt9RjE_BeA_Sd6vaRxA3mBdhTqoRGFTc_Y,1616
|
152
152
|
databricks/labs/lakebridge/transpiler/transpile_status.py,sha256=MO-Ju-ki3FCY15WxgwfPV9EC7Ma9q8aIfSTgHAmnkGU,1715
|
153
153
|
databricks/labs/lakebridge/transpiler/lsp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -165,9 +165,9 @@ databricks/labs/lakebridge/transpiler/sqlglot/parsers/presto.py,sha256=bY6Ku8ZPW
|
|
165
165
|
databricks/labs/lakebridge/transpiler/sqlglot/parsers/snowflake.py,sha256=dZ7BdOlBZlkbiN9G9bu4l2c456265Gx9WoWUPRa7Ffg,23203
|
166
166
|
databricks/labs/lakebridge/upgrades/v0.4.0_add_main_table_operation_name_column.py,sha256=wMTbj1q5td4fa5DCk0tWFJ-OmhhzsExRLYUe4PKmk0s,3527
|
167
167
|
databricks/labs/lakebridge/upgrades/v0.6.0_alter_metrics_datatype.py,sha256=hnTHRtqzwPSF5Judzh6ss-uB5h3IFtm2ylWduwRNq5Y,2424
|
168
|
-
databricks_labs_lakebridge-0.10.
|
169
|
-
databricks_labs_lakebridge-0.10.
|
170
|
-
databricks_labs_lakebridge-0.10.
|
171
|
-
databricks_labs_lakebridge-0.10.
|
172
|
-
databricks_labs_lakebridge-0.10.
|
173
|
-
databricks_labs_lakebridge-0.10.
|
168
|
+
databricks_labs_lakebridge-0.10.5.dist-info/METADATA,sha256=fY2pyveC_2Z9FjVEFHYNX23xEc8Fl1dbrhfiFcb886o,3078
|
169
|
+
databricks_labs_lakebridge-0.10.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
170
|
+
databricks_labs_lakebridge-0.10.5.dist-info/entry_points.txt,sha256=Idr1CT73b8wShdr287yu1hheGbDbhBvucVUlZcbpiPo,75
|
171
|
+
databricks_labs_lakebridge-0.10.5.dist-info/licenses/LICENSE,sha256=1hG0Cvw6mp9nL9qRoHFcCUk9fYqhcnj2vgJ75rt3BxA,3862
|
172
|
+
databricks_labs_lakebridge-0.10.5.dist-info/licenses/NOTICE,sha256=wtxMsNvTkw1hAEkkWHz8A8JrYySAUSt1tOTcqddkWEg,1797
|
173
|
+
databricks_labs_lakebridge-0.10.5.dist-info/RECORD,,
|
{databricks_labs_lakebridge-0.10.3.dist-info → databricks_labs_lakebridge-0.10.5.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|