Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
AKV0524
Contributor III
Contributor III

how to add datetime in qlik replicate table in suffix at global level

Hi Team,

 

we want to add datetime suffix in table name at global level transformation. 

Labels (1)
1 Solution

Accepted Solutions
Heinvandenheuvel
Specialist III
Specialist III

Hmm, are you sure you want to do that? You may want to explain in more details as we are not mind readers.

Anyway... just setup a global transformation !?

Heinvandenheuvel_1-1696880052279.png

The expression [fx] editor would look something like (change format string as needed) 

Heinvandenheuvel_0-1696879938808.png

 

In the exported JSON it would look like:

"action":	"RENAME_TABLE",
"name":	"Rename table 1",
"expression":	"$AR_M_SOURCE_TABLE_NAME || 
 strftime('%Y%m%d','now', 'localtime')",
"column":	{
	"where_column_name":	"%",
	"new_data_type":	"kAR_DATA_TYPE_STR",
	"where_sub_data_type":	"KAR_SUB_DATA_TYPE_UNSPECIFIED",
	"new_sub_data_type":	"KAR_SUB_DATA_TYPE_UNSPECIFIED"
},
"sub_action":	"RENAME_EXPRESSION",
"to_value":	"$AR_M_SOURCE_TABLE_NAME || strftime('_%Y%m%d','now', 'localtime')"

 

Good luck

View solution in original post

3 Replies
Heinvandenheuvel
Specialist III
Specialist III

Hmm, are you sure you want to do that? You may want to explain in more details as we are not mind readers.

Anyway... just setup a global transformation !?

Heinvandenheuvel_1-1696880052279.png

The expression [fx] editor would look something like (change format string as needed) 

Heinvandenheuvel_0-1696879938808.png

 

In the exported JSON it would look like:

"action":	"RENAME_TABLE",
"name":	"Rename table 1",
"expression":	"$AR_M_SOURCE_TABLE_NAME || 
 strftime('%Y%m%d','now', 'localtime')",
"column":	{
	"where_column_name":	"%",
	"new_data_type":	"kAR_DATA_TYPE_STR",
	"where_sub_data_type":	"KAR_SUB_DATA_TYPE_UNSPECIFIED",
	"new_sub_data_type":	"KAR_SUB_DATA_TYPE_UNSPECIFIED"
},
"sub_action":	"RENAME_EXPRESSION",
"to_value":	"$AR_M_SOURCE_TABLE_NAME || strftime('_%Y%m%d','now', 'localtime')"

 

Good luck

AKV0524
Contributor III
Contributor III
Author

Hi,

thanks for the suggestion let me try this solution

Thanks

Amit

AKV0524
Contributor III
Contributor III
Author

it works.

thankyou for the solution