[
  {"type":"CommentSingle","value":"-- basic statements\n"},
  {"type":"Text","value":"\n"},
  {"type":"Keyword","value":"CREATE"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"VIEW"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"my_typed_source"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":"\n  "},
  {"type":"Keyword","value":"SELECT"},
  {"type":"Text","value":"\n    "},
  {"type":"Punctuation","value":"("},
  {"type":"Name","value":"data"},
  {"type":"Operator","value":"-\u003e\u003e"},
  {"type":"LiteralStringSingle","value":"'field1'"},
  {"type":"Punctuation","value":")"},
  {"type":"Operator","value":"::"},
  {"type":"NameBuiltin","value":"boolean"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"field_1"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":"\n    "},
  {"type":"Punctuation","value":"("},
  {"type":"Name","value":"data"},
  {"type":"Operator","value":"-\u003e\u003e"},
  {"type":"LiteralStringSingle","value":"'field2'"},
  {"type":"Punctuation","value":")"},
  {"type":"Operator","value":"::"},
  {"type":"NameBuiltin","value":"int"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"field_2"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":"\n    "},
  {"type":"Punctuation","value":"("},
  {"type":"Name","value":"data"},
  {"type":"Operator","value":"-\u003e\u003e"},
  {"type":"LiteralStringSingle","value":"'field3'"},
  {"type":"Punctuation","value":")"},
  {"type":"Operator","value":"::"},
  {"type":"Keyword","value":"float"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"field_3"},
  {"type":"Text","value":"\n  "},
  {"type":"Keyword","value":"FROM"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"my_jsonb_source"},
  {"type":"Punctuation","value":";"},
  {"type":"Text","value":"\n\n"},
  {"type":"Keyword","value":"WITH"},
  {"type":"Text","value":"\n  "},
  {"type":"Name","value":"regional_sales"},
  {"type":"Text","value":" "},
  {"type":"Punctuation","value":"("},
  {"type":"Keyword","value":"region"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":" "},
  {"type":"Name","value":"total_sales"},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Punctuation","value":"("},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"SELECT"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"region"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":" "},
  {"type":"Name","value":"sum"},
  {"type":"Punctuation","value":"("},
  {"type":"Name","value":"amount"},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"FROM"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"orders"},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"GROUP"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"BY"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"region"},
  {"type":"Text","value":"\n  "},
  {"type":"Punctuation","value":"),"},
  {"type":"Text","value":"\n  "},
  {"type":"Name","value":"top_regions"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Punctuation","value":"("},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"SELECT"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"region"},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"FROM"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"regional_sales"},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"ORDER"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"BY"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"total_sales"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"DESC"},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"LIMIT"},
  {"type":"Text","value":" "},
  {"type":"LiteralNumberFloat","value":"5"},
  {"type":"Text","value":"\n  "},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":"\n"},
  {"type":"Keyword","value":"SELECT"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"region"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":"\n       "},
  {"type":"Name","value":"product"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":"\n       "},
  {"type":"Name","value":"SUM"},
  {"type":"Punctuation","value":"("},
  {"type":"Name","value":"quantity"},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"product_units"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":"\n       "},
  {"type":"Name","value":"SUM"},
  {"type":"Punctuation","value":"("},
  {"type":"Name","value":"amount"},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"product_sales"},
  {"type":"Text","value":"\n"},
  {"type":"Keyword","value":"FROM"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"orders"},
  {"type":"Text","value":"\n"},
  {"type":"Keyword","value":"WHERE"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"region"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"IN"},
  {"type":"Text","value":" "},
  {"type":"Punctuation","value":"("},
  {"type":"Keyword","value":"SELECT"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"region"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"FROM"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"top_regions"},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":"\n"},
  {"type":"Keyword","value":"GROUP"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"BY"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"region"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":" "},
  {"type":"Name","value":"product"},
  {"type":"Punctuation","value":";"},
  {"type":"Text","value":"\n\n"},
  {"type":"CommentSingle","value":"-- sources\n"},
  {"type":"Text","value":"\n"},
  {"type":"Keyword","value":"CREATE"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"SOURCE"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"webhook_with_basic_auth"},
  {"type":"Text","value":"\n"},
  {"type":"Keyword","value":"FROM"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"WEBHOOK"},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"BODY"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"FORMAT"},
  {"type":"Text","value":" "},
  {"type":"NameBuiltin","value":"JSON"},
  {"type":"Text","value":"\n    "},
  {"type":"Keyword","value":"CHECK"},
  {"type":"Text","value":" "},
  {"type":"Punctuation","value":"("},
  {"type":"Text","value":"\n      "},
  {"type":"Keyword","value":"WITH"},
  {"type":"Text","value":" "},
  {"type":"Punctuation","value":"("},
  {"type":"Text","value":"\n        "},
  {"type":"Keyword","value":"HEADERS"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":"\n        "},
  {"type":"Keyword","value":"BODY"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"request_body"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":"\n        "},
  {"type":"Keyword","value":"SECRET"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"basic_hook_auth"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"validation_secret"},
  {"type":"Text","value":"\n      "},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":"\n      "},
  {"type":"CommentSingle","value":"-- The constant_time_eq validation function **does not support** fully\n"},
  {"type":"Text","value":"      "},
  {"type":"CommentSingle","value":"-- qualified secret names. We recommend always aliasing the secret name\n"},
  {"type":"Text","value":"      "},
  {"type":"CommentSingle","value":"-- for ease of use.\n"},
  {"type":"Text","value":"      "},
  {"type":"Name","value":"constant_time_eq"},
  {"type":"Punctuation","value":"("},
  {"type":"Keyword","value":"headers"},
  {"type":"Operator","value":"-\u003e"},
  {"type":"LiteralStringSingle","value":"'authorization'"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":" "},
  {"type":"Name","value":"validation_secret"},
  {"type":"Punctuation","value":")"},
  {"type":"Text","value":"\n    "},
  {"type":"Punctuation","value":");"},
  {"type":"Text","value":"\n\n"},
  {"type":"Keyword","value":"CREATE"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"SOURCE"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"mz_source"},
  {"type":"Text","value":"\n  "},
  {"type":"Keyword","value":"FROM"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"MYSQL"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"CONNECTION"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"mysql_connection"},
  {"type":"Text","value":"\n  "},
  {"type":"Keyword","value":"FOR"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"TABLES"},
  {"type":"Text","value":" "},
  {"type":"Punctuation","value":"("},
  {"type":"Name","value":"schema1"},
  {"type":"LiteralNumberFloat","value":"."},
  {"type":"Name","value":"table_1"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"s1_table_1"},
  {"type":"Punctuation","value":","},
  {"type":"Text","value":" "},
  {"type":"Name","value":"schema2"},
  {"type":"LiteralNumberFloat","value":"."},
  {"type":"Name","value":"table_1"},
  {"type":"Text","value":" "},
  {"type":"Keyword","value":"AS"},
  {"type":"Text","value":" "},
  {"type":"Name","value":"s2_table_1"},
  {"type":"Punctuation","value":");"},
  {"type":"Text","value":"\n"}
]
