summaryrefslogtreecommitdiff
path: root/BDA/tp.py
diff options
context:
space:
mode:
Diffstat (limited to 'BDA/tp.py')
-rw-r--r--BDA/tp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/BDA/tp.py b/BDA/tp.py
new file mode 100644
index 0000000..9ace7e3
--- /dev/null
+++ b/BDA/tp.py
@@ -0,0 +1,7 @@
+from hdfs import InsecureClient
+client = InsecureClient('http://localhost:9870')
+
+with open('arbres.csv') as reader, client.write('/user/root/arbres.csv') as writer:
+ for line in reader:
+ writer.write(line)
+