Log Service allows you to upload a CSV file from your computer to Log Service by using an SDK. This way, the CSV file is hosted on Log Service and can be associated with a Logstore of Log Service. This topic describes how to perform a JOIN query on a CSV file that is hosted on Log Service and data in a Logstore of Log Service.
Prerequisites
- Logs are collected. For more information, see Log collection methods.
- Indexes are created. For more information, see Configure indexes.
- A CSV file is created.
- Log Service SDK for Python is installed. For more information, see Install Log Service SDK for Python.
aliyun-log-python-sdk V0.7.3 and later are supported. You can use the pip install aliyun-log-python-sdk -U command to upgrade the SDK.
Limits
- Only one CSV file can be associated at a time.
- You can associate Log Service with a CSV file that contains no more than 50 MB of data. The CSV file is uploaded to Log Service after it is compressed by using the SDK. The size of the file after compression must be less than 9.9 MB.
Sample data
The Logstore stores the logon operations of a user, and the CSV file records the basic information of the user, such as the gender and age. After you associate the Logstore with the CSV file, you can analyze the metrics for user properties.
- Logstore
userid:100001 action:login __time__:1637737306
- CSV file