> For the complete documentation index, see [llms.txt](https://docs.cloudfabrix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudfabrix.io/rda/rda-userguide/rda-aiops-studio/examples-jupyter/cfxdm-dm-dns_name_to_ip.md).

# Data Mapping cfxdm - dm:dns\_name\_to\_ip

DNS Name resolution from FQDN to IP Address

**dm:dns\_name\_to\_ip:** It allows to resolve the FQDN names to IP addresses listed in a column into another column.

**dm:dns\_name\_to\_ip:** Syntax

* **from\_cols** (mandatory)**:** Comma-separated list of column names which has DNS Name (FQDN) values
* **to\_cols** (mandatory)**:** Comma-separated list of column names to store resolved DNS Name (FQDN) names into IP Address.
* **keep\_value** (optional): If it is set to **'yes',** it stores the original value, else it stores the 'null' value. By default, it is set to '**no**'
* **num\_threads** (optional): Number of DNS lookup threads. Must be in the range of 1 to 20, Default is set to 5.

{% hint style="info" %}
This tag uses the DNS servers configured on the host os where **RDA** is installed and running for IP Address to DNS or FQDN name resolution.
{% endhint %}

{% hint style="info" %}
It requires an input dataset or a tag that has one or more columns with DNS Name (FQDN) values.
{% endhint %}

### Example 1:

Step 1: Create an empty **dm\_dns\_name\_to\_ip\_example\_1** using AIOps studio as shown in the below screenshot

![Empty pipeline](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7nwh8vuMUFU7KWKXF%2F-Mg7oOcvRvNSV6NuavRD%2FScreen%20Shot%202021-08-02%20at%202.42.31%20PM.png?alt=media\&token=764b3ea3-4c6e-4916-b7dc-1ffdef8c9aeb)

Step 2: Add the following pipeline code/commands into the above-created pipeline as shown in the below screenshot:

You can copy the below code into your pipeline and execute that in your environment.

\
*`###### Pipeline creates a dataset with server fqdn and pid runtime`* \
*`###### information on a windows box.`*\
*`###### Pipeline uses dm:dns_name_to_ip function to resolve FQDN DNS name to ipaddress`*\
*`###### dm function uses DNS server from RDA machine where it is installed`*\
\
*`@dm:empty`* \
*`--> @dm:addrow address = 'ec-test1.engr.cloudfabrix.com' & pid = 0`*\
*`--> @dm:addrow address = 'dns-cfx-dc1.engr.cloudfabrix.com' & pid = 1020`*\
*`--> @dm:addrow address = 'cfx-services-dep-01.engr.cloudfabrix.com' & pid = 1020`*\
*`--> @dm:addrow address = 'cfxregistry.cloudfabrix.com' & pid = 1064`*\
*`--> @dm:dns_name_to_ip from_cols = 'address' & to_cols = 'ip_address' & keep_value = 'yes'`*<br>

![Pipeline code added to the empty pipeline created above.](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7qsVvNWCW6Ew6XFGy%2F-Mg7r1GL_zvh3yNhj9LL%2FScreen%20Shot%202021-08-02%20at%202.54.05%20PM.png?alt=media\&token=99da3cb3-ca3f-43f9-8699-07b012820b8a)

Step &#x33;**:** Click verify button to verify the pipeline. RDA will verify the pipeline without any errors (as shown below)

![Pipeline code verified for any errors](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7r8P6741HgAVtfsZ-%2F-Mg7rYOOEnDsdvTrWdbZ%2FScreen%20Shot%202021-08-02%20at%202.56.20%20PM.png?alt=media\&token=df1105d0-df36-4999-8d63-d08a44736e60)

Step &#x34;**:** Click execute button to execute the pipeline. RDA will execute the pipeline without any errors (as shown below)

![Pipeline executed without any errors as shown above screenshot](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7rkHMKaqxUh1M9zgV%2F-Mg7s4OsZR4HRzuRTTvR%2FScreen%20Shot%202021-08-02%20at%202.58.39%20PM.png?alt=media\&token=b3e6ce4e-1cf8-483f-b051-5654c3e97211)

Step 5: Verify that the FQDN field as part of the dataset is resolved and print the IP Address using DNS resolution as shown in the below screenshot.

![RDA executes pipeline and resolve FQDN to IP Address using DNS server as shown above screenshot](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7sGQo_a9nfRV6fV26%2F-Mg7sdrsLuia4O2qn--K%2FScreen%20Shot%202021-08-02%20at%203.01.08%20PM.png?alt=media\&token=21013528-4531-4b1f-851a-6bb4d47f1dae)
