sql linting
This commit is contained in:
parent
594a615e1e
commit
6526dda8c7
|
@ -14,11 +14,12 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
select *
|
SELECT *
|
||||||
from ML.EXPLAIN_PREDICT(MODEL `{project-id}.{dataset}.{model-name}`,
|
FROM ML.EXPLAIN_PREDICT(MODEL `{project-id}.{dataset}.{model-name}`,
|
||||||
(select * except (session_id, session_starting_ts, user_id, has_purchased)
|
(SELECT * EXCEPT (session_id, session_starting_ts, user_id, has_purchased)
|
||||||
from `{project-id}.{dataset}.ecommerce_abt`
|
FROM `{project-id}.{dataset}.ecommerce_abt`
|
||||||
where extract(ISOYEAR from session_starting_ts) = 2023
|
WHERE extract(ISOYEAR FROM session_starting_ts) = 2023
|
||||||
),
|
),
|
||||||
STRUCT(5 AS top_k_features, 0.5 as threshold)
|
STRUCT(5 AS top_k_features, 0.5 AS threshold)
|
||||||
)
|
)
|
||||||
|
LIMIT 100
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
create or replace model `{project_id}.{dataset}.{model_name}`
|
CREATE OR REPLACE MODEL `{project_id}.{dataset}.{model_name}`
|
||||||
OPTIONS(model_type='{model_type}',
|
OPTIONS(MODEL_TYPE='{model_type}',
|
||||||
input_label_cols=['has_purchased'],
|
INPUT_LABEL_COLS=['has_purchased'],
|
||||||
enable_global_explain=TRUE,
|
ENABLE_GLOBAL_EXPLAIN=TRUE,
|
||||||
MODEL_REGISTRY='VERTEX_AI',
|
MODEL_REGISTRY='VERTEX_AI',
|
||||||
data_split_method = 'RANDOM',
|
DATA_SPLIT_METHOD = 'RANDOM',
|
||||||
data_split_eval_fraction = {split_fraction}
|
DATA_SPLIT_EVAL_FRACTION = {split_fraction}
|
||||||
) as
|
) AS
|
||||||
select * except (session_id, session_starting_ts, user_id)
|
SELECT * EXCEPT (session_id, session_starting_ts, user_id)
|
||||||
from `{project_id}.{dataset}.ecommerce_abt_table`
|
FROM `{project_id}.{dataset}.ecommerce_abt_table`
|
||||||
where extract(ISOYEAR from session_starting_ts) = 2022
|
WHERE extract(ISOYEAR FROM session_starting_ts) = 2022
|
Loading…
Reference in New Issue