© Hitachi Vantara LLC 2023. All Rights Reserved
Note: the data is being taken from the delta files stored in people-10m and export those parquet files into
the new location defined in “decades/19**“and then load that data into the External tables.
1. -- CETAS DECADES DEMO 50s -- ~5s (1.662.873)
2. CREATE EXTERNAL TABLE EXT_PEOPLE10M_50s
3. WITH
4. ( LOCATION = '/decades/1950s',
5. DATA_SOURCE = s3_delta_eds,
6. FILE_FORMAT = ParquetFileFormat)
7. AS
8. SELECT * FROM OPENROWSET
9. (BULK '/delta/people-10m', FORMAT = 'DELTA', DATA_SOURCE = 's3_delta_eds') as [r]
10. WHERE year(r.birthDate) < 1960
11.
12. -- CETAS DECADES DEMO 60s -- ~7s (3.743.270)
13. CREATE EXTERNAL TABLE EXT_PEOPLE10M_60s
14. WITH
15. ( LOCATION = '/decades/1960s',
16. DATA_SOURCE = s3_delta_eds,
17. FILE_FORMAT = ParquetFileFormat)
18. AS
19. SELECT * FROM OPENROWSET
20. (BULK '/delta/people-10m', FORMAT = 'DELTA', DATA_SOURCE = 's3_delta_eds') as [r]
21. WHERE year(r.birthDate) > 1959 AND year(r.birthDate) < 1970
22.
23. -- CETAS DECADES DEMO 70s -- ~8s (2.079.460)
24. CREATE EXTERNAL TABLE EXT_PEOPLE10M_70s
25. WITH
26. ( LOCATION = '/decades/1970s',
27. DATA_SOURCE = s3_delta_eds,
28. FILE_FORMAT = ParquetFileFormat)
29. AS
30. SELECT * FROM OPENROWSET
31. (BULK '/delta/people-10m', FORMAT = 'DELTA', DATA_SOURCE = 's3_delta_eds') as [r]
32. WHERE year(r.birthDate) > 1969 AND year(r.birthDate) < 1980
33.
34. -- CETAS DECADES DEMO 80s -- ~6s (2.080.733)
35. CREATE EXTERNAL TABLE EXT_PEOPLE10M_80s
36. WITH
37. ( LOCATION = '/decades/1980s',
38. DATA_SOURCE = s3_delta_eds,
39. FILE_FORMAT = ParquetFileFormat)
40. AS
41. SELECT * FROM OPENROWSET
42. (BULK '/delta/people-10m', FORMAT = 'DELTA', DATA_SOURCE = 's3_delta_eds') as [r]
43. WHERE year(r.birthDate) > 1979 AND year(r.birthDate) < 1990
44.
45. -- CETAS DECADES DEMO 90s -- ~5s (2.079.779)
46. CREATE EXTERNAL TABLE EXT_PEOPLE10M_90s
47. WITH
48. ( LOCATION = '/decades/1990s',
49. DATA_SOURCE = s3_delta_eds,
50. FILE_FORMAT = ParquetFileFormat)
51. AS
52. SELECT * FROM OPENROWSET
53. (BULK '/delta/people-10m', FORMAT = 'DELTA', DATA_SOURCE = 's3_delta_eds') as [r]
54. WHERE year(r.birthDate) > 1989 AND year(r.birthDate) < 2000
55.
56. -- CETAS DECADES DEMO 2000s -- ~3s (16.758)
57. CREATE EXTERNAL TABLE EXT_PEOPLE10M_00s
58. WITH
59. ( LOCATION = '/decades/2000s',
60. DATA_SOURCE = s3_delta_eds,