简体   繁体   English

在同一转换 ETL 中更改数据源

[英]Change datasource in the same tranformation ETL

I have a transformation to extract data for a database but the database source has many tables with different names.我有一个转换来为数据库提取数据,但数据库源有许多不同名称的表。 The database does have a structure consistent with my transformation, eg: Events_1, Events_2, Events_3.数据库确实具有与我的转换一致的结构,例如:Events_1、Events_2、Events_3。

It possible change the connection parameters for the extraction of all tables dynamically?是否可以动态更改用于提取所有表的连接参数? I want to extract all data with just one job that will still work when there is a new insert or a new table like Events_600.我想只使用一项工作来提取所有数据,当有新插入或新表(如 Events_600)时,该工作仍然有效。

Screen-shot of DB:数据库截图:

连接设置

You can use variables in the transformation and use them to set the connection and even to change the source table.您可以在转换中使用变量并使用它们来设置连接甚至更改源表。

You will need a job to run through the list of variable values, then once for each row pass those values as parameters to the transformation, for example.例如,您将需要一个作业来运行变量值列表,然后为每一行一次将这些值作为参数传递给转换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM