Ugrás a fő tartalomra

ODI + python / spark python

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())

----

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())

----









Megjegyzések