File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
articles/machine-learning Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -487,7 +487,7 @@ Defining paths to read Delta Lake tables is different compared to the other file
487
487
``` python
488
488
import mltable
489
489
490
- # define the path containing the delta table (where the _delta_log file is stored)
490
+ # define the cloud path containing the delta table (where the _delta_log file is stored)
491
491
delta_table = " abfss://<file_system>@<account_name>.dfs.core.windows.net/<path_to_delta_table>"
492
492
493
493
# create an MLTable. Note the timestamp_as_of parameter for time travel.
@@ -497,6 +497,21 @@ tbl = mltable.from_delta_lake(
497
497
)
498
498
```
499
499
500
+ If you want to get the latest version of Delta Lake data, you can pass current timestamp into ` timestamp_as_of ` .
501
+
502
+ ``` python
503
+ import mltable
504
+
505
+ # define the relative path containing the delta table (where the _delta_log file is stored)
506
+ delta_table_path = " ./working-directory/delta-sample-data"
507
+
508
+ # get the current timestamp in the required format
509
+ current_timestamp = time.strftime(" %Y-%m-%d T%H:%M:%SZ" , time.gmtime())
510
+ print (current_timestamp)
511
+ tbl = mltable.from_delta_lake(delta_table_path, timestamp_as_of = current_timestamp)
512
+ df = tbl.to_pandas_dataframe()
513
+ ```
514
+
500
515
### Files, folders and globs
501
516
502
517
Azure Machine Learning Tables support reading from:
You can’t perform that action at this time.
0 commit comments