Asana¶
Connect Foundry to Asana with the CData JDBC driver to import data into Foundry datasets.
Supported capabilities¶
| Capability | Status |
|---|---|
| Exploration | 🟢 Generally available |
| Bulk import | 🟢 Generally available |
| Incremental | 🟢 Generally available |
Data model¶
The CData driver models Asana data as a list of tables in a relational database that can be queried using standard SQL statements. For information about the available tables and their contents, review the CData documentation for Asana tables ↗.
Setup¶
- Open the Data Connection application and select + New Source in the upper right corner of the screen.
- Select Asana from the available connector types.
- Follow the additional configuration prompts to continue the setup of your connector using the information in the sections below.
Learn more about setting up a connector in Foundry.
Authentication¶
Authentication to Asana is performed with personal or service access tokens.
To generate a Service Account or personal access token, follow the guides in the Asana documentation:
- Service Account token ↗
- Use a Service Account token for persistent and durable source creation that does not directly link to an individual user.
- Personal access token ↗
- Some organizations do not allow users to create access tokens. Reach out to your Asana administrators if you have issues obtaining one.
Networking¶
The Asana connector requires network access to app.asana.com on port 443. Ensure that an egress policy exists for the source.
Configuration options¶
The following configuration options are available for the Asana connector:
| Option | Required? | Description |
|---|---|---|
Project ID |
Yes | Find the project ID in the URL of the project on Asana. For example: https://app.asana.com/0/PROJECT_ID/list |
Credentials settings |
Yes | Configure using the Authentication guidance shown above. |
Proxy settings |
No | Enable and enter the username and password to allow a proxy connection to Asana. |
Logs |
No | Enable to control how the connector logs information. Review the log settings section below for more details. |
Log settings¶
Detailed logs may be required to troubleshoot connections. Use Verbosity level setting to increase or decrease the amount of information logged.
:::callout{theme="warning"} Increasing log verbosity can lead to sensitive information being saved into Foundry build logs. Before sharing these logs, redact any passwords as necessary. Review the CData documentation to learn more about different verbosity levels ↗. :::
Sync data from Asana¶
To set up a Asana sync, select Explore and create syncs in the upper right of the source Overview screen. Next, select the tables you want to sync into Foundry. When you are ready to sync, select Create sync for x datasets.
Learn more about source exploration in Foundry.
Configure Asana syncs¶
The Asana connector allows for advanced sync configurations to determine how much of which data is brought into Foundry.
After exploring your available tables and adding them to your connection, navigate to Edit syncs. From the Syncs panel to the left, find the sync you want to configure and select > to the right.
| Option | Required? | Description |
|---|---|---|
Table |
Yes | Choose what table from Asana should be copied into Foundry. See data model for what tables are supported. |
Column selection |
No | Select a subset of columns to sync into Foundry. Review the column selection section below for more information. |
Row filters |
No | Enable and add filters to remove rows that do not fit criteria based on its column values. Review the row filters section below for more information. |
Limit |
No | Adds an SQL limit clause to the underlying query. This setting can be used to limit the number of rows synced into Foundry in a single run. |
Incremental |
No | Enable to sync data into Foundry in small batches. Review the incremental section below for more information. |
Incremental¶
Typically, syncs will import all matching rows from the target table, regardless if data changed between syncs or not. Incremental syncs, by contrast, maintain state about the most recent sync and only ingest new matching rows from the target.
Incremental syncs can be used when ingesting large tables from Asana. To use incremental syncs, the table must contain a column that is strictly monotonically increasing. Additionally, the table being read from must contain a column with one of the following data types:
DATETIMESTAMP
Numeric column types:
intTINYINTSMALLINTINTEGERlongBIGINTNUMERICNUMBERDECIMALDEC
String column types:
stringVARCHARCHARNVARCHARNCHARLONGNVARCHARLONGVARCHAR
Incremental syncs require the following configurations:
| Option | Required? | Description |
|---|---|---|
| Column | Yes | Select the column that will be used for incremental ingests. The dropdown menu will be empty if the table does not contain any supported columns types. |
Initial value |
Yes | The value from which to start syncing data. |
Example: A 5TB table contains billions of rows that we want to sync to Asana. The table has a monotonically increasing column called id. The sync can be configured to ingest 50 million rows at a time using the id column as the incremental column, with an initial value of -1 and a configured limit of 50 million rows.
When a sync is initially run, the first 50 million rows (ascending based on id) containing an id value greater than -1 will be ingested into Foundry. For example, if this sync was run several times and the largest id that was ingested during the last run of this sync was 19384004822, the next sync will ingest the next 50 million rows starting with the first id greater than 19384004822, and so on.
Column selection¶
Choose the columns to sync into Foundry. If no column is selected, all columns will be synced into Foundry.
:::callout{theme="warning"} All column names must start with either an underscore or a character from the English alphabet. The names can only contain underscores, characters from the English alphabet, or numbers.
The following examples are valid column names:
_colum_namea_column_name_123
The following examples are invalid column names:
1ColumnName; starts with a number.a-column-name*; contains hyphens and an asterisk.å-column-name; contains non-English characters. :::
Row filters¶
Filters can be added to reduce the amount of synced rows or to individually select which rows will be synced into Foundry. For row filters to be configured, previews of the table must succeed. Before configuring row filters, we recommend refreshing the preview using the Preview of inbound data section at the bottom of the interface. The preview can be refreshed to validate the behavior of the filters added.
A filter configuration consists of a set of conditions that each row must pass for it to be synced into Foundry. Each set of conditions can be evaluated to either match if all the conditions match or if at-least onecondition matches. Sets of conditions can be nested to give more fine-grained control over what to import and provide high flexibility. These are equivalent to AND and OR statements in standard SQL.
A condition itself is a simple comparison of a value in the column of the table in Asana against a value that can be entered in the interface. For example, the condition CreatedAt is equal to 12/04/2021 will only import those rows where the value in the CreatedAt column is 12/04/2021. The data type of the column determines the comparison operations that are supported.
Comparison operations¶
The following operations are supported in the filter:
EQUAL TOGREATER THANLESS THANGREATER THAN OR EQUAL TOLESS THAN OR EQUAL TONOT EQUAL TOIS NULLIS NOT NULL
These comparison operations behave equivalent to how these operations would behave in standard SQL.
String type columns additionally support Like and Not like operators which use the standard SQL-92 syntax.
中文翻译¶
Asana¶
使用 CData JDBC 驱动程序将 Foundry 连接到 Asana,从而将数据导入 Foundry 数据集。
支持的功能¶
| 功能 | 状态 |
|---|---|
| 数据探索 | 🟢 正式可用 |
| 批量导入 | 🟢 正式可用 |
| 增量同步 | 🟢 正式可用 |
数据模型¶
CData 驱动程序将 Asana 数据建模为关系数据库中的一系列表,可使用标准 SQL 语句进行查询。有关可用表及其内容的详细信息,请查阅 CData 文档中的 Asana 表 ↗。
设置¶
- 打开 数据连接 应用程序,然后选择屏幕右上角的 + 新建数据源。
- 从可用的连接器类型中选择 Asana。
- 按照其他配置提示,使用以下部分中的信息继续设置连接器。
了解更多关于在 Foundry 中设置连接器的信息。
身份验证¶
对 Asana 的身份验证通过个人访问令牌或服务访问令牌进行。
要生成服务账户或个人访问令牌,请按照 Asana 文档中的指南操作:
网络连接¶
Asana 连接器需要通过端口 443 访问 app.asana.com。请确保为该数据源配置了出站策略。
配置选项¶
Asana 连接器提供以下配置选项:
| 选项 | 是否必需 | 描述 |
|---|---|---|
项目 ID |
是 | 在 Asana 项目的 URL 中查找项目 ID。例如:https://app.asana.com/0/PROJECT_ID/list |
凭据设置 |
是 | 按照上述身份验证指南进行配置。 |
代理设置 |
否 | 启用并输入用户名和密码以允许通过代理连接到 Asana。 |
日志 |
否 | 启用以控制连接器记录信息的方式。有关更多详细信息,请查看下面的日志设置部分。 |
日志设置¶
排查连接问题时可能需要详细日志。使用详细级别设置来增加或减少记录的信息量。
:::callout{theme="warning"} 提高日志详细级别可能导致敏感信息被保存到 Foundry 构建日志中。在分享这些日志之前,请根据需要删除任何密码。查阅 CData 文档以了解更多关于不同详细级别 ↗的信息。 :::
从 Asana 同步数据¶
要设置 Asana 同步,请选择数据源概览屏幕右上角的探索并创建同步。接下来,选择要同步到 Foundry 的表。准备同步时,选择为 x 个数据集创建同步。
了解更多关于在 Foundry 中探索数据源的信息。
配置 Asana 同步¶
Asana 连接器支持高级同步配置,以确定将哪些数据以及多少数据导入 Foundry。
在探索可用表并将其添加到连接后,导航至编辑同步。从左侧的同步面板中,找到要配置的同步并选择右侧的 >。
| 选项 | 是否必需 | 描述 |
|---|---|---|
表 |
是 | 选择要从 Asana 复制到 Foundry 的表。请参阅数据模型了解支持哪些表。 |
列选择 |
否 | 选择要同步到 Foundry 的列子集。有关更多信息,请查看下面的列选择部分。 |
行过滤器 |
否 | 启用并添加过滤器,以删除不符合基于列值条件的行。有关更多信息,请查看下面的行过滤器部分。 |
限制 |
否 | 为基础查询添加 SQL limit 子句。此设置可用于限制单次运行中同步到 Foundry 的行数。 |
增量同步 |
否 | 启用以分批将数据同步到 Foundry。有关更多信息,请查看下面的增量同步部分。 |
增量同步¶
通常,同步会导入目标表中的所有匹配行,无论同步之间数据是否发生变化。相比之下,增量同步会维护最近一次同步的状态,仅导入目标表中新的匹配行。
在从 Asana 导入大型表时,可以使用增量同步。要使用增量同步,表中必须包含一个严格单调递增的列。此外,被读取的表必须包含具有以下数据类型之一的列:
DATETIMESTAMP
数值列类型:
intTINYINTSMALLINTINTEGERlongBIGINTNUMERICNUMBERDECIMALDEC
字符串列类型:
stringVARCHARCHARNVARCHARNCHARLONGNVARCHARLONGVARCHAR
增量同步需要以下配置:
| 选项 | 是否必需 | 描述 |
|---|---|---|
| 列 | 是 | 选择将用于增量导入的列。如果表中不包含任何支持的列类型,下拉菜单将为空。 |
初始值 |
是 | 开始同步数据的值。 |
示例: 一个 5TB 的表包含数十亿行数据,我们希望将其同步到 Asana。该表有一个名为 id 的单调递增列。可以将同步配置为使用 id 列作为增量列,初始值为 -1,并设置限制为 5000 万行,从而每次导入 5000 万行。
当首次运行同步时,将导入 id 值大于 -1 的前 5000 万行(按 id 升序排列)到 Foundry。例如,如果此同步运行了多次,且上次运行时导入的最大 id 值为 19384004822,则下一次同步将从第一个大于 19384004822 的 id 开始,导入接下来的 5000 万行,以此类推。
列选择¶
选择要同步到 Foundry 的列。如果未选择任何列,则所有列都将同步到 Foundry。
:::callout{theme="warning"} 所有列名必须以英文字母或下划线开头。列名只能包含下划线、英文字母或数字。
以下是有效的列名示例:
_colum_namea_column_name_123
以下是无效的列名示例:
1ColumnName;以数字开头。a-column-name*;包含连字符和星号。å-column-name;包含非英文字符。 :::
行过滤器¶
可以添加过滤器来减少同步的行数,或单独选择要同步到 Foundry 的行。要配置行过滤器,必须成功预览表。在配置行过滤器之前,我们建议使用界面底部的入站数据预览部分刷新预览。可以刷新预览以验证所添加过滤器的行为。
过滤器配置由一组条件组成,每行必须通过这些条件才能同步到 Foundry。每组条件可以评估为匹配所有条件或匹配至少一个条件。条件组可以嵌套,以更精细地控制导入内容并提供高度灵活性。这相当于标准 SQL 中的 AND 和 OR 语句。
条件本身是对 Asana 表中列的值与界面中输入的值进行简单比较。例如,条件 CreatedAt 等于 12/04/2021 将仅导入 CreatedAt 列中值为 12/04/2021 的行。列的数据类型决定了支持的比较操作。
比较操作¶
过滤器中支持以下操作:
等于大于小于大于或等于小于或等于不等于为空不为空
这些比较操作的行为与标准 SQL 中的相应操作相同。
字符串类型的列还支持 Like 和 Not like 运算符,使用标准 SQL-92 语法。