ODI (Oracle Data Integrátor) MAP Filter objektum:
Használata:
import pyspark
sc = pyspark.SparkContext('local[*] ')
txt = sc.textFile('file:////usr/ share/doc/python/copyright')
print(txt.count())
python_lines = txt.filter(lambda line: 'python' in line.lower())
print(python_lines.count())
----
importpyspark
sc=
pyspark.SparkContext('local[*]
')
txt=
sc.textFile('file:////usr/
share/doc/python/copyright')
print(txt.count())
python_lines=
txt.filter(lambda
line:
'python'
in
line.lower())
print(python_lines.count())
----
Hasznos link: https://pypi.org/project/ pyspark/
Megjegyzések
Megjegyzés küldése