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

**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](/files/-Mg7oOcvRvNSV6NuavRD)

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.](/files/-Mg7r1GL_zvh3yNhj9LL)

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](/files/-Mg7rYOOEnDsdvTrWdbZ)

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](/files/-Mg7s4OsZR4HRzuRTTvR)

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](/files/-Mg7sdrsLuia4O2qn--K)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudfabrix.io/rda/rda-userguide/rda-aiops-studio/examples-jupyter/cfxdm-dm-dns_name_to_ip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
