res_local(param, default=None, type="auto")
Parameter Name | Parameter Description | Parameter Type | Required | Parameter Default Value | Parameter Value Range |
param | Field name corresponding to the environment variable in advanced configuration | string | Yes | - | - |
default | If the field value does not exist, return the value of this parameter. Default value: None. | string | Yes | None | - |
type | Data format for data output. auto (default): Convert the original value to JSON format. If conversion fails, return the original value. JSON: Convert the original value to JSON format. If conversion fails, return the parameter value of default. raw: Return the original value. | string | Yes | auto | - |
{}
fields_set("time_session", res_local("time_session"))
{"time_session":"30"}
res_rds_mysql(alias, database="database name", sql="select name from person_info", refresh_interval=0, base_retry_back_off=1, max_retry_back_off=60, update_time_key=None, use_ssl=False)
Parameter Name | Parameter Description | Parameter Type | Required | Parameter Default Value | Parameter Value Range |
alias | Configured database information alias | string | Yes | - | - |
database | Database name. | string | Yes | - | - |
sql | SQL statement to retrieve data | string | Yes | - | - |
refresh_interval | Fetch interval (unit: second). Default value is 0, which means only fetch once. | number | No | 0 | - |
base_retry_back_off | Failed to pull data, re-pull time interval. Default value is 1, unit: second. | number | No | 0 | - |
max_retry_back_off | The maximum time interval to retry request after failed to pull data. Default value is 60, unit: second, recommended to use the default value. | number | No | 60 | - |
update_time_key | Used for incremental data retrieval. If this parameter is not configured, perform a full update. | string | No | - | - |
use_ssl | Whether to use SSL protocol for secure connection | bool | No | False | - |

[{"user_id": 1},{"user_id": 3}]
//On the console, configure the alias of external data MySQL as hm, set the db of mysql to test222, and the table name to test//Pull all data from MySQL and use the t_table_map function to associate dimension tablest_table_map(res_rds_mysql(alias="hm",database="test222",sql="select * from test"),"user_id",["gameid", "game"])
[{"user_id":"1"},{"game":"wangzhe","gameid":"123","user_id":"3"}]
id | game_id | game_name | region | game_details |
1 | 10001 | Honor of Kings | CN | MOBA |
2 | 10002 | League of Legends | NA | PC MOBA |
3 | 10003 | Genshin Impact | CN | RPG |
4 | 10004 | Black Myth: Wukong | CN | PC Game |
5 | 10005 | Diablo | NA | Role play |
[{"id": 1},{"id": 2},{"id": 3}]
//On the console, configure the alias of external data MySQL as hm, set the db of mysql to test222, and the table name to test//select * from test where region='CN', pull data with region='CN' from MySQL, use t_table_map function to associate dimension tablet_table_map(res_rds_mysql(alias="hm",database="test222",sql="select * from test where region='CN'"),"id",["game", "game_details"])
[{"game_details":"MOBA mobile game""game_name":"Honor of Kings""id":"1"},{"id":"2"},{"game_details":"open world RPG game""game_name":"Genshin Impact""id":"3"}]
Feedback