How to Create a Single DataPancake Data Source (Script Builder)
Build a script to create and initiate a scan for a single data source in DataPancake and optionally generate SQL code.
Please ensure the Admin Guides have been completed before creating your first data source.
1. Navigate to the "Data Source" script builder

2. Enter the custom data source name

3. (Optional) Change the app database name
The default is DATAPANCAKE

4. Enter the role used to install DataPancake

5. Enter the role which has the select privilege for the database object to be scanned

6. Select the Snowflake Database Object Type

7. Select the Column Data Type (Semi-Structured Only)

8. Select the Data Source Type

9. (Semi-Structured Only) Select the Data Format Type

10. Select the Attribute Create Type

11. Enter the Snowflake database name that contains the data

12. (Optional) Indicate if the database is shared

13. Enter the name of the schema which contains the database object to be scanned

14. Enter the name of the database object to be scanned

15. (Semi-Structured Only) Enter the name of the column to be scanned

16. Select the warehouse to be used by DataPancake to scan

17. (Optional) Prevent the scan from starting automatically
If you switch this off, you will need to manually trigger the data source scan from the "Scan Data" page.

18. (Optional) Enter a record limit for the initial scan
If you want to scan all records, set the limit to 0

19. (Optional) Enable Additional Paid Features

20. (Optional) Disable Using Case Sensitivity

The "Generate Code After Scan" will automatically create the output SQL statements based on the discovered schema at the completion of the scan.
SQL Code Generation is a paid feature available once you purchase the application or as part of an Enterprise license. Code Generation in the Trial version is not enabled.
If you choose not to generate code, skip to the "Generate Script" step below.
21. (Optional) Enable generating SQL code after the scan completes
With the SQL Code Generation feature enabled, you can also generate SQL code on scanned data sources from the "Generated SQL" page as needed.

22. Enter the user defined name for the root dynamic table, such as 'dt_<object_name>'

23. Enter the user defined name for the root dynamic table, such as 'dt_<object_name>'

24. Enter the name of the warehouse used to refresh dynamic tables
This warehouse name is included as part of the create dynamic SQL table statements.

25. Select the Semantic Layer - Object Type

26. Enter the user defined name for the root level view, such as 'vw_<object_name>'

27. Click "Generate Script"

28. Copy the script

29. Open a new snowflake worksheet and paste the script

30. Scroll Down to Review the Optional Parameters as Part of the Code Generation

31. Execute the Script
Use the blue dropdown arrow at the top right and click "Run All"

32. Ensure successful execution by examining the call result column in the result set
If you mistyped any of the database connection information, the resulting error message will show you what was incorrect.
If the warehouse used has not been previously added to DataPancake, then the scan will not be initiated.
If the scan is initiated, the result message will show that the scan has started.
Last updated
Was this helpful?