How to add new colums in AWS Databrew based on some logic and values in existing colums

24 Views Asked by At

I have a CSV which I'm seeing in my AWS Databrew. I have a column which has CIDR column (cidr_value) having ip values like 1.0.0.0/24, 1.0.1.0/24, etc.

I want to create three new cols like

col1 = network_head (ie. js equivalent `cidr_value.split(".")[0]`)

col2 = lower int range of ip

col3 = upper int range of ip 

And finally I want to save this data in a new CSV.

I know there is a web function known as IP_TO_INT to calculate the integer value of an ip, but it takess ip not cidr value

0

There are 0 best solutions below