databricks 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/databricks/resources/dbfs.rb +24 -0
- data/lib/databricks/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fa10746d84fcd9135f2b811ae8f48509fde3ef567fa87b914c337a0881d7e9e
|
4
|
+
data.tar.gz: 8cedbeb212e416c99d84fc0f5f53ec609e0510f021af5142c550a7272d0b1a79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18cda5b9682e863158015c018fa1941b135421feac1361c6a8714dd51d82f484010d7cce4538d9dd04fcd91f494c486a78ba155824e9c1dcede212849a45730a
|
7
|
+
data.tar.gz: dd5c5fea89ab21a638e88ea16665722457fbfa2d48811f7cdba6228927a2293338611003a611b1880035c5f5782911d200f7ce954f21c3bfd41c487107799bdd
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'base64'
|
2
|
+
|
1
3
|
module Databricks
|
2
4
|
|
3
5
|
module Resources
|
@@ -47,6 +49,28 @@ module Databricks
|
|
47
49
|
)
|
48
50
|
end
|
49
51
|
|
52
|
+
# Read a file.
|
53
|
+
# Decodes the content in the json response (that is originally Base64-encoded).
|
54
|
+
#
|
55
|
+
# Parameters::
|
56
|
+
# * *path* (String): Path to the file to read
|
57
|
+
# * *offset* (Integer): Offset to read from [default: 0]
|
58
|
+
# * *length* (Integer): Number of nytes to read from (max 1MB) [default: 524_288]
|
59
|
+
def read(path, offset: 0, length: 524_288)
|
60
|
+
raw_json = get_json(
|
61
|
+
'dbfs/read',
|
62
|
+
{
|
63
|
+
path: path,
|
64
|
+
offset: offset,
|
65
|
+
length: length
|
66
|
+
}
|
67
|
+
)
|
68
|
+
{
|
69
|
+
'bytes_read' => raw_json['bytes_read'],
|
70
|
+
'data' => Base64.decode64(raw_json['data'])
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
50
74
|
end
|
51
75
|
|
52
76
|
end
|
data/lib/databricks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: databricks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Muriel Salvan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
|
-
rubygems_version: 3.2.
|
108
|
+
rubygems_version: 3.2.15
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Rubygem wrapping the Databricks REST API
|