

# IntToIp class
<a name="aws-glue-api-pyspark-transforms-IntToIp"></a>

`IntToIp` 変換は、ソース列の整数値または他の値を、次にターゲット列の対応する IPv4 値に変換し、結果を新しい列に返します。

## 例
<a name="pyspark-IntToIp-examples"></a>

```
from pyspark.context import SparkContext
from pyspark.sql import SparkSession
from awsgluedi.transforms import *

sc = SparkContext()
spark = SparkSession(sc)

input_df = spark.createDataFrame(
    [
        (3221225473,),
        (0,),
        (1,),
        (100,),
        (168430090,),
        (4294967295,),
        (4294967294,),
        (4294967296,),
        (-1,),
        (None,),
    ],
    ["source_column_int"],
)

try:
    df_output = web_functions.IntToIp.apply(
        data_frame=input_df,
        spark_context=sc,
        source_column="source_column_int",
        target_column="target_column",
        value=None
    )
    df_output.show()
except:
    print("Unexpected Error happened ")
    raise
```

## Output
<a name="pyspark-IntToIp-output"></a>

出力は次のとおりです。

```
```
+---------------+---------------+
|source_column_int|target_column|
+---------------+---------------+
| 3221225473| 192.0.0.1 |
| 0| 0.0.0.0 |
| 1| 0.0.0.1 |
| 100| 0.0.0.100|
| 168430090 | 10.0.0.10 |
| 4294967295| 255.255.255.255|
| 4294967294| 255.255.255.254|
| 4294967296| null |
| -1| null |
| null| null |
+---------------+---------------+
```
```

 `IntToIp.apply` 変換では、「source\$1column」を『source\$1column\$1int』として、「target\$1column」を『target\$1column』として受け取り、「source\$1column\$1int」列の整数値を対応する IPv4 アドレス表現に変換し、結果を「target\$1column」列に保存します。

 IPv4 アドレス (0～4294967295) の範囲内の有効な整数値の場合、変換は IPv4 アドレス表現 (192.0.0.1、0.0.0.0、10.0.0.10、255.255.255.255 など) に正常に変換します。

 有効範囲外の整数値 (例: 4294967296、-1) の場合、「target\$1column」値は「null」に設定されます。「source\$1column\$1int」列の「null」値の場合、「target\$1column」値も「null」に設定されます。

## 方法
<a name="aws-glue-api-pyspark-transforms-IntToIp-_methods"></a>
+ [\$1\$1call\$1\$1](#aws-glue-api-pyspark-transforms-IntToIp-__call__)
+ [適用](#aws-glue-api-crawler-pyspark-transforms-IntToIp-apply)
+ [名前](#aws-glue-api-crawler-pyspark-transforms-IntToIp-name)
+ [describeArgs](#aws-glue-api-crawler-pyspark-transforms-IntToIp-describeArgs)
+ [describeReturn](#aws-glue-api-crawler-pyspark-transforms-IntToIp-describeReturn)
+ [describeTransform](#aws-glue-api-crawler-pyspark-transforms-IntToIp-describeTransform)
+ [describeErrors](#aws-glue-api-crawler-pyspark-transforms-IntToIp-describeErrors)
+ [説明](#aws-glue-api-crawler-pyspark-transforms-IntToIp-describe)

## \$1\$1call\$1\$1(spark\$1context, data\$1frame, target\$1column, source\$1column=None, value=None)
<a name="aws-glue-api-pyspark-transforms-IntToIp-__call__"></a>

`IntToIp` 変換は、ソース列の整数値または他の値を、次にターゲット列の対応する IPv4 値に変換し、結果を新しい列に返します。
+ `sourceColumn` - 既存の列の名前。
+ `value` – 評価する文字列。
+ `targetColumn` – 作成される新しい列の名前。

## apply(cls, \$1args, \$1\$1kwargs)
<a name="aws-glue-api-crawler-pyspark-transforms-IntToIp-apply"></a>

継承元は `GlueTransform` [適用](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-apply)。

## name(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-IntToIp-name"></a>

継承元は `GlueTransform` [名前](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-name)。

## describeArgs(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-IntToIp-describeArgs"></a>

継承元は `GlueTransform` [describeArgs](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeArgs)。

## describeReturn(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-IntToIp-describeReturn"></a>

継承元は `GlueTransform` [describeReturn](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeReturn)。

## describeTransform(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-IntToIp-describeTransform"></a>

継承元は `GlueTransform` [describeTransform](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeTransform)。

## describeErrors(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-IntToIp-describeErrors"></a>

継承元は `GlueTransform` [describeErrors](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeErrors)。

## describe(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-IntToIp-describe"></a>

継承元は `GlueTransform` [説明](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describe)。