> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nrev.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Column

> Dynamically create new columns in your DataFrame using static or dynamic values with placeholder variables.

## What It Does

* **Dynamically creates new columns** in your DataFrame based on static or dynamic values, including placeholder variables.
* **Automatically resolves column name conflicts** by adding numeric suffixes (e.g., `deal_stage` → `deal_stage_1`).
* **Supports creating multiple columns** in a single operation to streamline your workflow.
* **Includes a test mode**, limiting the output to the first 5 rows for validation purposes.

***

## 🏁 Getting Started

<Frame>
  <img src="https://mintcdn.com/nurturev/OitEIaKlfl7lCKCJ/images/Create%20Column%20Node%20config%20screenshot.png?fit=max&auto=format&n=OitEIaKlfl7lCKCJ&q=85&s=8d3c4973630e174159455c5fd1dfc4f0" alt="Create Column Node config screenshot" style={{ borderRadius: '0.5rem', width: '100%', margin: '1.5rem 0' }} width="1178" height="1664" data-path="images/Create Column Node config screenshot.png" />
</Frame>

<Steps>
  <Step title="Add the Create Column Node">Drag and drop the Create Column Node into your workflow.</Step>
  <Step title="Define Columns to Create">Specify the columns to be created with either static or dynamic values (e.g., `lead_source` or `deal_size`).</Step>
  <Step title="Run the Workflow">Execute the workflow to create the new columns in the output DataFrame.</Step>
  <Step title="Monitor the Output">The output DataFrame will contain the original columns plus the newly created ones.</Step>
</Steps>

***

## Inputs

### 🛠️ Required Fields

* **Column Name (✅)**\
  The name of the column to be created.\
  *Why it matters:* Specifies the name of the new column that will be added to the DataFrame.

* **Value (✅)**\
  The value to be assigned to the column. This can be a static value or a dynamic placeholder.\
  *Why it matters:* The value that will fill the new column, allowing for custom data calculations or classifications.

***

## Output

You’ll get back your input data — plus the columns you chose to add.

* **Row count and column order are preserved.**

<Note>
  ✨ If your table already has any of those column names, the new ones will be renamed automatically (e.g., `summary_1`, `summary_2`, etc.).
</Note>

***

## How It Works

1. Loads the input DataFrame from the previous node.
2. Resolves column names to avoid conflicts with existing columns.
3. Processes each row to replace placeholder variables with actual values.
4. Adds the new columns to the output DataFrame.
5. If in test mode, limits the output to the first 5 rows.
6. Saves the output DataFrame to S3 and returns the output metadata.

***

## 🚀 Example Use Cases & Prompts

| Use Case               | Setup or Prompt Example                                    |
| ---------------------- | ---------------------------------------------------------- |
| Track lead source      | `"lead_source": "LinkedIn"`                                |
| Calculate deal size    | `"deal_value": `quantity`*`price\_per\_unit\`\`            |
| Classify lead status   | `"lead_status": "MQL"` (based on lead score threshold)     |
| Calculate deal urgency | `"deal_urgency": "High"` (based on `close_date` proximity) |
| Add account region     | `"account_region": `country\`\`                            |

***

## ✨ Pro Tips

<Tip>
  Use this node to create a **lead score classification** column by combining behavior data with firmographics (e.g., `"lead_classification": `"High" if `engagement_score` > 75\`\`).
</Tip>

<Tip>
  Use this node to add **targeted campaign tags** based on dynamic conditions like `product_interest` or `last_contacted_date`.
</Tip>

***

## ⚠️ Important Considerations

<Warning>
  At least one column must be selected for the node to run.
</Warning>

***

## 🛠 Troubleshooting & Gotchas

| Symptom                               | Likely Cause            | Quick Fix                            |
| ------------------------------------- | ----------------------- | ------------------------------------ |
| Column contains different information | Renamed due to conflict | Look for suffix like `lead_status_1` |

***

## 📝 FAQ

<AccordionGroup>
  <Accordion title="Can I configure dynamic columns based on custom thresholds?">
    No. Use other nodes like *Filter Data* to achieve the same.
  </Accordion>

  <Accordion title="Do I need to manually reference each column?">
    No, use the **Insert Input** feature to easily select and insert columns from the previous node.
  </Accordion>

  <Accordion title="What if a column name conflicts with an existing one?">
    The node automatically adds numeric suffixes (e.g., `lead_status_1`) to avoid overwriting.
  </Accordion>
</AccordionGroup>

***

## 💰 Pricing

The Create Column Node incurs **no additional cost** for column creation.

| Action                           | Credit Cost |
| -------------------------------- | ----------- |
| Column creation (static/dynamic) | 0 credits   |

***

<p style={{ fontSize: '1rem', fontWeight: 'bold', marginTop: '1.5rem' }}>
  Drop this node into your flow to dynamically create new columns in your DataFrame. 🚀
</p>
