Teilen über


input_file_block_start

Gibt den Anfangsoffset des gelesenen Blocks oder -1 zurück, falls nicht verfügbar.

Syntax

from pyspark.sql import functions as sf

sf.input_file_block_start()

Examples

Beispiel 1: Abrufen des Startoffsets des Eingabedateiblocks

from pyspark.sql import functions as sf
df = spark.read.text("python/test_support/sql/ages_newlines.csv", lineSep=",")
df.select(sf.input_file_block_start()).show()
+------------------------+
|input_file_block_start()|
+------------------------+
|                       0|
|                       0|
|                       0|
|                       0|
|                       0|
|                       0|
|                       0|
|                       0|
+------------------------+