Skip to Content

Snowflake SnowPro Core: How can Snowflake user load duplicate files with COPY INTO command

Question

How can a Snowflake user load duplicate files with a COPY INTO command?

A. The COPY INTO options should be set to PURGE = FALSE
B. The COPY INTO options should be set to FORCE = TRUE
C. The COPY INTO options should be set to RETURN_FAILED_ONLY = FALSE
D. The COPY INTO options should be set to ON_ERROR = CONTINUE

Answer

B. The COPY INTO options should be set to FORCE = TRUE

Explanation

The correct answer is B. The COPY INTO options should be set to FORCE = TRUE.

The COPY INTO command is a SQL statement that can be used to load data from files into tables or stages in Snowflake. The COPY INTO command supports various options that can modify its behavior and performance.

One of the options is FORCE, which controls whether the COPY INTO command should load duplicate files or skip them. By default, the FORCE option is set to FALSE, which means that the COPY INTO command will skip any files that have already been loaded into the table or stage. This can prevent loading duplicate data and improve performance by avoiding unnecessary work.

However, if a Snowflake user wants to load duplicate files with the COPY INTO command, they can set the FORCE option to TRUE, which means that the COPY INTO command will load all files regardless of whether they have already been loaded or not. This can be useful for scenarios where the user wants to overwrite existing data or append new data from the same files.

The other options are incorrect because:

  • A. The COPY INTO options should be set to PURGE = FALSE. This is false because this option does not affect whether the COPY INTO command should load duplicate files or not. The PURGE option controls whether the COPY INTO command should delete the source files after loading them or not. By default, the PURGE option is set to TRUE, which means that the COPY INTO command will delete the source files after loading them. Setting the PURGE option to FALSE will prevent the COPY INTO command from deleting the source files, but it will not make it load duplicate files.
  • C. The COPY INTO options should be set to RETURN_FAILED_ONLY = FALSE. This is false because this option does not affect whether the COPY INTO command should load duplicate files or not. The RETURN_FAILED_ONLY option controls whether the COPY INTO command should return information about all files or only failed files in its output. By default, the RETURN_FAILED_ONLY option is set to TRUE, which means that the COPY INTO command will only return information about failed files in its output. Setting the RETURN_FAILED_ONLY option to FALSE will make the COPY INTO command return information about all files in its output, but it will not make it load duplicate files.
  • D. The COPY INTO options should be set to ON_ERROR = CONTINUE. This is false because this option does not affect whether the COPY INTO command should load duplicate files or not. The ON_ERROR option controls how the COPY INTO command should handle errors during loading. By default, the ON_ERROR option is set to ABORT_STATEMENT, which means that the COPY INTO command will abort and roll back if any error occurs during loading. Setting the ON_ERROR option to CONTINUE will make the COPY INTO command continue and commit if any error occurs during loading, but it will not make it load duplicate files.

Reference

Snowflake SnowPro Core certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Snowflake SnowPro Core exam and earn Snowflake SnowPro Core certification.

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.