# View: dt_podcast_categories_mapping

**View Name:** dt_podcast_categories_mapping
**Table Source:** `INTELLIGENCE.DBT_PROD.DT_PODCAST_CATEGORIES_MAPPING`
**File Path:** `dt_podcast_categories_mapping.view.lkml`

## Overview

- **File Size:** 955 bytes
- **Lines of Code:** 36
- **Dimensions:** 4
- **Measures:** 0
- **Dimension Groups:** 0
- **Filters:** 0

## Comments & Notes

- derived_table: {
- sql: with category_ids as (
- select  id, replace(categories, '[','') as part_one,

## Dimensions

| Name | Type |
|------|------|
| `podcast_id` | number |
| `category_1_id` | number |
| `category_2_id` | number |
| `category_3_id` | number |

## Derived Table

```sql
#     sql: with category_ids as (

# select  id, replace(categories, '[','') as part_one,
# replace(part_one, ']','') as categories_cleaned
# from ORCHARD_APP_REPORTING_V2.PROD_OWS_PODCAST_OWS_PODCAST.PODCAST)

# select id as podcast_id, try_to_numeric(split_part(categories_cleaned,',',1)) as category_1_id,
# try_to_numeric(split_part(categories_cleaned,',',2)) as category_2_id,
# try_to_numeric(split_part(categories_cleaned,',',3)) as category_3_id
# from category_ids ;;
#
```

