rhythmic-morning-85986
10/20/2023, 6:47 PMSELECT
user_id,
anonymous_id,
timestamp,
1 as value
FROM
main.analytics.events -- replace this with a fact table called AnalyticsEvents
where event in ('Application Opened')
fresh-football-47124
rhythmic-morning-85986
10/20/2023, 6:49 PM{
"status": 400,
"message": "The operation failed due to an error",
"errorId": "36143d91749c45368a4e69013ba464ad"
}
fresh-football-47124
rhythmic-morning-85986
10/20/2023, 6:58 PMfresh-football-47124
rhythmic-morning-85986
10/20/2023, 7:17 PMSELECT
user_id, timestamp as client_ts, received_at as timestamp, anonymous_id,
event, *
FROM
main.analytics.events
where received_at > '2023-10-16'
*Sample 5 Rows* Succeeded in 3372ms
fresh-football-47124
rhythmic-morning-85986
10/23/2023, 3:04 PMfuture-teacher-7046
rhythmic-morning-85986
10/23/2023, 3:05 PMfuture-teacher-7046
information_schema
queries to populate our schema browserrhythmic-morning-85986
10/23/2023, 3:09 PMThe operation failed due to an error
future-teacher-7046
rhythmic-morning-85986
10/23/2023, 3:22 PM{
"status": 400,
"message": "The operation failed due to an error",
"errorId": "b73ff6ddd391423db1d536440392aaf5"
}
future-teacher-7046
rhythmic-morning-85986
10/23/2023, 3:27 PMfuture-teacher-7046
WITH _table as (
SELECT timestamp from ([factTable.sql]) t WHERE [filter.sql]
)
SELECT * FROM _table LIMIT 5
rhythmic-morning-85986
10/23/2023, 3:34 PMfuture-teacher-7046
rhythmic-morning-85986
10/23/2023, 3:46 PMfuture-teacher-7046
rhythmic-morning-85986
10/23/2023, 4:00 PMselect user_id, foo as timestamp, *
which somehow worked in the preview and save for the fact table SQL, but weren't valid SQL due to duplicate column names. Luckily databricks has (select * except (...)
) so this is now working with the fact table.future-teacher-7046
rhythmic-morning-85986
10/23/2023, 4:02 PMfuture-teacher-7046
SELECT *
and we don't explicitly do SELECT timestamp, ...