mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-04 12:51:23 +00:00 
			
		
		
		
	
		
			
	
	
		
			41 lines
		
	
	
		
			769 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			41 lines
		
	
	
		
			769 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								view: my_derived_view {
							 | 
						||
| 
								 | 
							
								  derived_table: {
							 | 
						||
| 
								 | 
							
								    sql:
							 | 
						||
| 
								 | 
							
								        SELECT
							 | 
						||
| 
								 | 
							
								          country,
							 | 
						||
| 
								 | 
							
								          city,
							 | 
						||
| 
								 | 
							
								          timestamp,
							 | 
						||
| 
								 | 
							
								          measurement
							 | 
						||
| 
								 | 
							
								        FROM
							 | 
						||
| 
								 | 
							
								          ${my_view.SQL_TABLE_NAME} AS my_view ;;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  dimension: country {
							 | 
						||
| 
								 | 
							
								    type: string
							 | 
						||
| 
								 | 
							
								    description: "The country"
							 | 
						||
| 
								 | 
							
								    sql: ${TABLE}.country ;;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  dimension: city {
							 | 
						||
| 
								 | 
							
								    type: string
							 | 
						||
| 
								 | 
							
								    description: "City"
							 | 
						||
| 
								 | 
							
								    sql: ${TABLE}.city ;;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  dimension_group: timestamp {
							 | 
						||
| 
								 | 
							
								    group_label: "Timestamp"
							 | 
						||
| 
								 | 
							
								    type: time
							 | 
						||
| 
								 | 
							
								    description: "Timestamp of measurement"
							 | 
						||
| 
								 | 
							
								    sql: ${TABLE}.timestamp ;;
							 | 
						||
| 
								 | 
							
								    timeframes: [hour, date, week, day_of_week]
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  measure: average_measurement {
							 | 
						||
| 
								 | 
							
								    group_label: "Measurement"
							 | 
						||
| 
								 | 
							
								    type: average
							 | 
						||
| 
								 | 
							
								    description: "My measurement"
							 | 
						||
| 
								 | 
							
								    sql: ${TABLE}.measurement ;;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								}
							 |